Yeah, this is one of the downsides, I think.  In general, you probably don't 
want to stack up too many changes in one go before saving, but it does feel 
like there needs to be a way to either get all errors from all related objects 
in a single list, or at least ask which objects contain errors.  It's probably 
not too hard to patch this in, just traversing the associations graph and 
checking their #errors.

Jump on the IRC channel (irc.feenode.net/#datamapper) and ask, you may get some 
better responses.


On 27/09/2011, at 5:15 AM, George wrote:

> When you have a model that fails to save, is there a way to find out
> why?
> 
> The cause could be one of its many related models and collections. The
> only article I could find about this topic is the rant at
> http://www.drmaciver.com/2010/04/datamapper-is-inherently-broken/ and
> that led me to try setting raise_on_save_failure. That only confirmed
> that an error occured. It could not why or where.
> 
> Many thanks,
> George
> 
> -- 
> 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.
> 

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