On Jul 12, 6:02 am, Glen <[EMAIL PROTECTED]> wrote: > Out of curiosity, why does Sequel::Model.new use set rather than > set_all when from_db is false? It threw me for a bit trying to figure > out why I couldn't set the primary key on a new record through the new > method.
The primary key is protected by default. If you want the primary key to be set with new/create/set/update, use Model.unrestrict_primary_key to unprotect it. Sequel should raise an Error if you try to set a primary key when it is protected, unless you have Model.strict_param_setting = false. Jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en -~----------~----~----~----~------~----~------~--~---
