has many problems (again)

[prev] [thread] [next] [Date index for 2005/07/06]

From: Patrik Wallstrom
Subject: has many problems (again)
Date: 14:51 on 06 Jul 2005
Hi!

I am building an application where I have Items and Contacts like
this:

package Item;
__PACKAGE__->columns(Primary => 'ITEM_ID');
__PACKAGE__->columns(Essential => 'ITEM_INFO');

package Contact;
__PACKAGE__->columns(Primary => CONTACT_ID');
__PACKAGE__->columns(Essential => CONTACT_INFO');

I also have a table that looks like this:

ItemsToContacts:
ITEMSTOCONTACTS_ID
ITEM_ID
CONTACT_ID
TYPE

where TYPE can be one of "billing", "tech" and "admin".

What I would like to be able to do is something like this:
$item->billing->contact_info and
$item->tech->contact_info

Do I make things too complicated for myself?
How would I solve this?

        -- 
        patrik_wallstrom->foodfight->pawal@xxxxx.xxx->+46-733173956
                `-> http://www.gnuheter.com/

has many problems (again)
Patrik Wallstrom 14:51 on 06 Jul 2005

Re: has many problems (again)
Shane McEwan 00:20 on 07 Jul 2005

Generated at 16:35 on 28 Jul 2005 by mariachi v0.52