On 7/28/06 5:34 AM, Danial Pearce wrote: > If you use the "with" support in the load() method, you get no SQL > when you turn $Rose::DB::Object::Debug to 1. I tried to write a patch > for you, but i got lost :-)
That's because it's really the Manager doing the loading for you in that case. Try turning on $Rose::DB::Object::Manager::Debug = 1. > Also, is there any sort of "cascade" support for save()? If you set or updated any of the *lists* related items (as in, set the whole list or add to the existing list) using one of the relationship methods, save()ing the parent will also save() all the modified lists of child items. If you want to save() any child items that have merely been modified in place, no, there's no automatic mechanism to do that, but adding one shouldn't be too hard. I'll add it to my list. > If there isn't, would the best method be to overload save() and call save() > on all ->meta->relationships() the "changes_only => 1" field. 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. Right. I'll have to add some ::Util methods or something to check whether a list of related objects has been loaded. > I was hoping to use the debug thing on the load() to see if the > "with" is actually worthwhile. I.e. does it play nice and do a join > so that it's a single select to get all the data required? Yeah, it does. -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