Re: Inheritance & Relationship
Re: Inheritance & Relationship
- Subject: Re: Inheritance & Relationship
- From: David Avendasora <email@hidden>
- Date: Mon, 2 Jan 2006 10:11:55 +0000
As far as i can recall, the doc mentiones, that you need to add a
property
like "type" in the base class, which is set from the derived
classes, and
you need to fetch yourself.
Wolfram,
I do have a partType attribute and it is set properly in by the
individual subclasses. The problems is that I don't know how (or if
it is possible) to have a Direct to Java Client app return the right
SUBclass object based on the partType.
With the relationship I have now (Label has a Part) D2JC simply
returns a Part object, not the actual subclass (FinishedGood,
IntermediatePart or RawMaterial). If I were to setup individual
relationships for each type it would allow me to open the correct
subclass, but it would also then show one attribute in the UI for
each relationship .
I'm sure if I were writing the Java code myself I could make the
interface return the proper subclass based on the partType, but I
don't see how to do it with a D2JC app without freezing the UI and
modifying the Java myself.
If this is the case, then I will do that. I'm just hoping that there
is something I'm missing, or that I am possibly building my
relationship incorrectly.
Dave
See in "Using EOModel":
--> Vertical mapping requires a restricting qualifier if you want to
fetch records from a parent entity (Person in this example).
This i valid not only for vertical mapping!
Wolfram
_______________________________________________
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