Re: structure opinions
Re: structure opinions
- Subject: Re: structure opinions
- From: Paul Hoadley <email@hidden>
- Date: Sun, 15 Sep 2013 08:50:35 +0930
On 14/09/2013, at 1:59 PM, Theodore Petrosky < email@hidden> wrote: I want to have an entity Person with a to-many to address. a Person could have many addresses (home, second home, weekend place, love nest).
Sounds fair. You could model address types with an enum using the javaEnum prototype, for example.
And I have clients. a Client needs addresses too (billing, main office, act rep, etc)
how would you model this?
a person entity with a to-many relationship to address a client entity with a to-many relationship to address
or would you create a subclass of address and map that to the clients.
Going on just what you've described, I see no reason to subclass Address. Even if the Address types for each are mutually exclusive (e.g. a Person wouldn't have a billing address, and a Client wouldn't have a weekend address), you could model that by having Person and Client know which enums they were allowed to accept.
is it 'bad' to have two to-many relations to an entity, (both person, and client mapped to entity address).
No.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden