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?