Skip to content

Way to specify field as read-only (do not insert)? #629

@sparkertime

Description

@sparkertime

I have a field whose value must be generated by the DB at insertion time by calling a Postgres function. I have defined the column as extern_id varchar(10) NOT NULL DEFAULT next_extern_id() I would like the application to read the value of this field, however.

I have tried both :read_after_write and :autogenerate on my field definitions but unfortunately they still try to pass an explicitly null value for this column. Is there a way to specify this field should not be part of any INSERT or UPDATE statement, but should be part of a RETURNING clause?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions