On Tue, Aug 14, 2012 at 5:13 PM, Jeremy Evans <[email protected]> wrote: > On Monday, August 13, 2012 11:07:52 PM UTC-7, Christian MICHON wrote: >> >> One problem though: using this code, my saved Human object 'Bobby' >> gets its id = 2, because 1st save did not work: is this the expected >> behavior? > > > The reason you get id 2 is that it actually tries to do the insert for the > first save. That's because you didn't use the constraint_validations plugin > in the Human model (you only used the Database extension). If you use the > model plugin, the validation code should see the name Bob as invalid and > should not attempt the insert.
My bad: I should have realized I only triggered the extension and not the plugin. >From a personal point of view, this looks like a very good feature :-) -- Christian -- 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.
