• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Inherited Relationships using Different Destinations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inherited Relationships using Different Destinations


  • Subject: Re: Inherited Relationships using Different Destinations
  • From: David Avendasora <email@hidden>
  • Date: Fri, 5 Sep 2008 11:09:53 -0400


On Sep 5, 2008, at 10:53 AM, Florijan Stamenkovic wrote:

But you can override a method that returns NSArray<? extends ManufacturedBatch> with one that returns NSArray<LotCode>. So, if done this way you could have the relationships declared in all the Java classes.

Doh! Of course. I forgot about the oh-so-intuitive "? extends Class" syntax.


Still trying to figure out how Dave actually modeled this... Had no idea you could "override" relationship properties (destination) in subentities...

Yep. After you make the relationship on the super, go to the sub and simply make the same relationship (same name) but pointing to a different Entity. In my case the the way it will be is:


In Part:
public NSArray<? extends LotCode> lotCodes()...

and

In Intermediate:
public NSArray<? extends ManufacturedBatch> lotCodes()...

Intermediate is a subclass of Part, and ManufacturedBatch is a subclass of LotCode.

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
  • Follow-Ups:
    • Re: Inherited Relationships using Different Destinations
      • From: Chuck Hill <email@hidden>
References: 
 >Inherited Relationships using Different Destinations (From: David Avendasora <email@hidden>)
 >Re: Inherited Relationships using Different Destinations (From: David Avendasora <email@hidden>)
 >Re: Inherited Relationships using Different Destinations (From: Mike Schrag <email@hidden>)
 >Re: Inherited Relationships using Different Destinations (From: David Avendasora <email@hidden>)
 >Re: Inherited Relationships using Different Destinations (From: Mike Schrag <email@hidden>)
 >Re: Inherited Relationships using Different Destinations (From: Florijan Stamenkovic <email@hidden>)

  • Prev by Date: WOMailDelivery error message
  • Next by Date: Re: WOCookie & Safari
  • Previous by thread: Re: Inherited Relationships using Different Destinations
  • Next by thread: Re: Inherited Relationships using Different Destinations
  • Index(es):
    • Date
    • Thread