You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DataMapper
I'm in the process of using contextual validations for the first time,
and I've discovered that if I save an object that has children, the
children will be saved with the same context as the primary object.
However, if there's no validation declared for the child with that
particular context, an exception will be raised.
I can see that if the child has a validation defined for the context
specified when the primary object is saved, then it absolutely makes
sense to run that. But it's not clear to me that you should actually
be required to have a validation defined on the child for that
context. And if the child doesn't actually require validation, I guess
you would have to add a validates_with_block with an empty block.
Is this the intended behavior, or something worth changing?
Mark.
Fluxx
unread,
Nov 16, 2009, 1:43:35 AM11/16/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DataMapper
This bit me just now too. It seems to happen even if you say "has
n, :through => Resource," and try to save the parent with a context.
It appears to be requiring the parent's context to exist on the join
modelI'm currently on Datamapper 0.10.0.
Is this the expected behavior?
-J
Jeff Pollard
unread,
Nov 18, 2009, 5:23:24 PM11/18/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DataMapper
Sorry to bump this thread, but it's currently blocking our migration to 0.10.x, which we'd really like to be on. If this is the expected behavior, that is an okay thing, we just need to know if that's the case :)
Thanks,
-J
--
You received this message because you are subscribed to the Google Groups "DataMapper" group.