Using cakephp, I have a generic address table, which I want to link to customers, vendors, contacts. most of the tables only have a 1 to 1 relationship, but I want my customers table to have 2
perhaps for clarification: I have a customers table
id, int
mailing_address_id, int
billing_address_id, int
and an addresses table
id,int
addr, varchar
city, varchar
etc....
Now I know I could put a customer_id
in the addresses table. But I don't want to do that because I have a vendors table, and contacts table, and other tables that all are going to use the addresses table. the customer_id
would not really be relavant to those other tables.
I'd like the Customer model to automatically link in the two addresses