On 14 Mar 2006, John Siracusa wrote: > On 3/14/06 4:17 AM, Michael Lackhoff wrote: > > Is it possible to either define a default sort_by clause in the > > relationship definition > > See Uwe's earlier response for how to do this.
Yes, that works great. Thanks! > > or when the relationship method is actually used > > ($company->products({sort_by => 'name'}) or something > > That's not currently possible because a hashref argument to a relationship > accessor method already has a meaning: At the moment I can do without it because I only need one sort order. > # Set this company's list of products to > # products 123 and 456 > $company->products({ id => 123 }, { id => 456 }); > > # Set this company's vendor to Acme > $company->vendor({ name => 'Acme' }); > > Can you think of a good way to pass custom manager_args to individual calls > to a relationship accessor? Maybe a new read-only accessor type where > arguments can't possible be meant to set values? Yes, perhaps, or a second hashref with meta-args. When I was looking for a solution I always thought: "It must be something like the manager method get_products() and that is read- only. But on the other hand perhaps it is better to leave it until you see a really good solution. Cheers, Michael ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object