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

Also, is there any sort of "cascade" support for save()? I notice  
there is support in delete(). 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.

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;

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? E.g. in  
the above code would the sql join on the bar/baz table, or would it  
do 3 separate selects?

regards,
Danial

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

Reply via email to