On 7/28/06, Danial Pearce <[EMAIL PROTECTED]> wrote: > is there any sort of "cascade" support for save()? I notice there is support > in delete(). [...] The issue I have here is, if those relationships are lazy > evaluating, you don't want to go and populate the relationship object just to > save it. E.g. > > $foo->load(with => [ qw(bar baz) ]); > $foo->bar->something('some value'); > $foo->bar->save; ## hopefully i shouldn't have to do this > $foo->save;
Cascaded save is implemented in SVN and will be included in the next CPAN release. It works like this: $foo->load(with => [ qw(bar baz) ]); $foo->bar->something('some value'); $foo->save(cascade => 1); # $foo and bar are both saved The default_cascade_save() method on the metadata object determines the default value of the "cascade" parameter for a given class. (It's false by default.) -John ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object