> If you want to do ad-hoc queries with filters, either use the Manager
> directly, or create your own object methods that wrap the appropriate
> manager calls:
> 
>     package Cart;
>     ...
>     sub get_items
>     {
>       my($self, %args) = @_;
>       # Clause that links items to this cart
>       push(@{$args{'query'}}, cart_id => $self->id);
>       return CartItem::Manager->get_items(%args)
>     }


That's pretty much what I had in mind if there wasn't anything else.
The trick is to use the correct meta info to set the query rather than
hard coding pk/fk column names.

Thanks,
-=Chris

Attachment: signature.asc
Description: OpenPGP digital signature

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