Kristian,

On Aug 16, 1:27 am, kristian <[email protected]> wrote:
> one issue with validation came to my mind. if the update fails due to
> validation errors, then how are these errors handled ? limit them to
> the attributes affected by the update or extend validation to include
> the dirty attributes (which did not contribute to the validation for
> the update). I find it difficult to say what I expect, either way
> sounds wrong to me.

Oh, that's a good one.  I hadn't thought about that.

Yeah, the more I think about it the more I believe that
Resource#update should throw an exception when called on a dirty
resource.  I don't think I'm going to bother exploring the variable
stashing, as there are too many weird edge cases for such little
benefit.

I've updated dm-core/next edge to raise an exception when
Resoure#update and Resource#update! are called on a dirty resource.

--

Dan Kubb
(dkubb)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" 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/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to