Hi Jeremy, I have a Postgres table with two identity columns: the primary key (:id) and another column (:order_number). I want to create a Sequel::Model instance, save it to this table, and have it take the next values in each of the two sequences. However, Sequel is trying to insert a NULL into the :order_number column, which is invalid (identity columns are NOT NULL). If I do :identity=>:always in my migration, the INSERT INTO still includes the NULL and fails, but the error includes the note about OVERRIDING SYSTEM VALUE.
How can I tell Sequel not to include the :order_number column in the INSERT INTO statement if it's nil? (Should the Postgres adapter exclude all identity columns by default unless given a non-nil value?) Alternatively, is there some sentinel value I can assign to the :order_number field that will get passed to Postgres and coax it to do the right thing? I'm hoping this is just a simple case of the Friday night stupids and your answer will immediately enlighten me, as it usually does. Thanks in advance. Mike -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
