Commit message:

    Add Model.raise_on_save_failure, raising errors on save failure
instead of return false (now nil), default to true

    This breaks backwards compatibility, but I believe it is the
correct
    default for most non-web-apps.  The problem with just returning a
    value is that the return value is often not checked, and I think
that
    invalid data should be treated as an exceptional condition by
    default.

    Like the strict_param_setting and typecast_on_assignment setting,
    you can turn this off/on at the global, class, and instance level:

      Sequel::Model.raise_on_save_failure = false # Global
      Artist.raise_on_save_failure = true # Class
      artist = Artist.new
      artist.raise_on_save_failure = false # Instance

    Backwards compatibility is even slightly broken if you turn it
off,
    as save and it's variants will now return nil instead of false.
The
    exception is save_changes, which will now have the same behavior
as
    before, returning nil if no columns changed, and false if the save
    fails.

http://github.com/jeremyevans/sequel/commit/eb2143a633223eb08da11820658a9fa38cef0a5a

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to