Re: EOModeling Addresses.... better design
Re: EOModeling Addresses.... better design
- Subject: Re: EOModeling Addresses.... better design
- From: Benjamin J Doherty <email@hidden>
- Date: Wed, 08 Dec 2004 11:02:12 -0600
Erwin wrote:
I am modeling Address entity for a Customer entity (one-to many)
(delivering, billing, home, office,..)
I defined a default address using an addressType attribute in the
Address entity
but
should it be better (if possible,) to define in EOModeler a specific
one-to-one relationship (defaultAddress) ??
I heard that modeling addresses (should be simple !) seems to be a
little bit tricky....
I'm not clear on what you're proposing.
Are you proposing subclassing the Address entity to create a new entity
that has a qualifier that determines whether the address is default?
Or are you proposing a new relationship to the same Address entity? (I
don't know if you can put additional qualifiers on relationships except
as additional joins, which I'm having a hard time visualizing in your
situation.)
You probably need to do a fetch specification if you're thinking of the
latter. If you're considering the former, you're going to have to
abstract your Address entity and create subclasses for each kind of
Address a customer might have, and that means that "default" will be
distinct from any other address for the customer. You probably want to
do a fetch spec that gets the default address.
Modeling addresses isn't hard, but when you start dealing with multiple
addresses, preferrerd addresses, then you're hopefully dealing with
fetch specs.
Cheers,
Benjamin Doherty
Chicago
Benjamin Doherty
Chicago
_______________________________________________
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