Re: Question on Inherited Relationships
Re: Question on Inherited Relationships
- Subject: Re: Question on Inherited Relationships
- From: Chuck Hill <email@hidden>
- Date: Fri, 12 Nov 2004 12:02:21 -0800
Kieran,
I think you are confused. :-) You have a Account. An Account has a
Trader. A Trader might be a Vendor or a Customer or SomethingElse. But
they are all Traders. The relationship will contain an object of the
correct class (com.foo.bar.Vendor or com.foo.bar.Customer). This is just
straight Java object references and subclassing. If you need to do
someting Vendor or Customer specific to the related object, well, you are
going to have to cast it.
Chuck
At 02:26 PM 12/11/2004 -0500, Kieran Kelleher wrote:
>>>>
I am doing my first project with inheritance and I need some EOModeling
advice please.
I have an abstract entity Trader with to-one relationship to foreign key,
oidTrader, in entity Account
Trader <-> Account
The relationships are set as mandatory both ways and cascade from the
Trader side.
I have Customer and Vendor , both are single-table-inheritance subclasses
of Trader
So, in "Account", I still have a relationship "trader", but no "customer"
or "vendor" relationship.
My question will this all "just work" when I use account.trader in java or
do I need to create new explicit relationships to "customer" and "vendor"
in which case I am stuck on how the mandatory account->trader integrity
rule will play?
-Kieran
________________________________________________________________
Dev Config = OS X 10.3.5 / Java 1.4.2_05 / WO 5.2.3 / XCode v1.5 / MySQL
4.0.20 / Connector-J 3.0.11
Deploy Config = OS X 10.3.5 Server / Java 1.4.2_05 / WO 5.2.3 / MySQL
4.0.20 / Connector-J 3.0.11
My Blog: http://webobjects.webhop.org/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
.net
This email sent to email@hidden<<<<
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
_______________________________________________
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