On 1/30/07 7:16 PM, Jonathan Vanasco wrote: >> Every call to find_prices() goes back to the database to get new rows. >> Those rows are returned, not saved in the parent object ($p) at all. > > what about temp_find , return_only_find , or something else in the > name to reflect that the results aren't saved ? > > or maybe just require an argument like 'return_only => 1' or > something similar, > > my main concern is for people who are looking at other's code , or > haven't touched rose in a while , will know that nothing is saved by > this operation.
Given that this method will always be called with arguments, and that those arguments can change per-call, how can there be any expectation that the results will be saved internally? How would such a feature even work? The whole point of the find method is to allow ad hoc queries. Think of it as a Manager call with the query parameters that link one object to another being implied, rather than explicitly visible in the args. If someone wants to keep the results of a find method call around for a while, they certainly have the means to do so by...keeping the results around for a while! :) # Keep @prices around until it's no longer needed @prices = $p->find_prices(...); If there exists a well-defined set of related objects that you want to be able to keep inside the parent object, just create a relationship with all the parameters that define this set, then use the usual get_set_on_save method. -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