I'm having a brain freeze, and I'll blame working with both DBIC and
RDBO at the same time. :-)
Classic example, cart and cart_item tables in a one to many. I have a
relationship 'items' setup, and it returns all of the carts items using
$cart->items...but for the life of me, I can't figure out ho
On 12/12/06, Christopher H. Laco <[EMAIL PROTECTED]> wrote:
> Classic example, cart and cart_item tables in a one to many. I have a
> relationship 'items' setup, and it returns all of the carts items using
> $cart->items...but for the life of me, I can't figure out how to only
> return some of the
> 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
Christopher H. Laco wrote:
>> 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) = @_;
>> #
On 12/12/06 6:29 PM, Christopher H. Laco wrote:
> IS it necessary to configure both the foreign_keys and relationship meta
> information, or will just going relationships do in most cases?
If your database has a real foreign key, then set up foreign key metadata.
If not, set up a relationship.
-J