>
> I have identified the following alternatives:
>>
>> - Disable the :default_setters cache on this particular model
>> - Add a unique constraint but no validation to the :order_number
>> column (and handle the constraint violation exception in my application
>> framework)
>>
>> The simplest solution is just to get the sequence number before inserting:
>
> def before_create
> super
> self.order_number = DB.get{nextval("bs_order_number_seq")}
> end
>
I can work with that. Does before_create always happen in a transaction
with create, or should I wrap a transaction around Model#create?
Where can I go to buy you a cup of coffee or otherwise contribute to Sequel
development?
--
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.