I tried something along those lines at some point,
but couldn't figure out how to set up the new child
objects so that if saved, they wouldn't either
not save them at all (if I didn't somehow associate
them with the to-be-saved parent object),
save too early (using "<<" to associate them with
the parent), or create new ones (using parent.build).
Looks like I'll have to explicitly save all the pieces
separately and wrap it in a transaction on my own. Was
just hoping to leverage the nice rails-y "parent.save"
thing that works with children built with "build" or
"<<"
-glenn
Rob Kaufman wrote:
Also, remember that ids are cheep and it is OK (though a little time
consuming) to go ahead and create records only to destroy them later.
Sometimes it is the only way to beat the chicken vs the egg effect.
Rob
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby