Re: Inherited Relationships using Different Destinations
Re: Inherited Relationships using Different Destinations
- Subject: Re: Inherited Relationships using Different Destinations
- From: David Avendasora <email@hidden>
- Date: Thu, 4 Sep 2008 12:40:46 -0400
You know, sometimes I really amaze myself at how far I can go down the
wrong path before I realize how completely wrong something is.
Of course a subclass can't override the return type of an inherited
method. That's a Java rule, not a EOF rule.
EOGenerator was saving my butt without me even knowing it.
Sheesh.
Dave
On Sep 4, 2008, at 10:25 AM, David Avendasora wrote:
Hi all,
I have two Single-Table Inheritance structures in my application:
Part
-Intermediate
--Finished
LotCode
-ManufacturedBatch
--ManufacturedPart
Currently I have the relationships modeled as:
Part<->>LotCode (relationship named "lotCodes()")
Intermediate<->>ManufacturedBatch (relationship is still called
"lotCodes")
Finished<->>ManufacturedPart (relationship is still called "lotCodes")
The thing I just noticed is that in my generated _Entity.java
classes there is no lotCodes() method defined because the
EOGenerator template skips it due to being inherited. Which makes
sense, but is not what I want.
So the generated code does not _really_ agree with the EOModel.
The app seems to work just fine up to now because I've never
expected the lotCodes() relationship on an Intermediate to return an
instance of ManufacturedBatch.
But now I do.
I just want to know if it is legal from an EOF standpoint to have an
inherited relationship to have a different (yet child) destination
entity before I go modifying my EOGen templates. I can't really see
why it wouldn't be legal.
Thanks!
Dave
_______________________________________________
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
_______________________________________________
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