• 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: Inheritance...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inheritance...


  • Subject: Re: Inheritance...
  • From: Mike Schrag <email@hidden>
  • Date: Thu, 8 May 2008 11:27:58 -0400

There are a number of issues with prefetching relationships that relate back to an abstract entity.

Yay... Is this true also of single-table inheritance?
Yes.


Just to get it straight, you keep the not-null constraints in the model, but skip them in the db? Can't find docs on this...
Yes. Welcome to the awesome docs on inheritance in EOF. They don't document a LOT of stuff. Just try to understand the docs on vertical -- it's impossible. I believe Entity Modeler does NOT automatically do this right now, but it briefly did and after a knock-down-drag-out "discussion" a year or two ago, it was taken back out, but I'm going to put it back in because ... well ... because I can and I want it there :)

Also, I've been reading the UsingEOModeler part of the old Apple's WO documentation, and when modeling single-table inheritance it uses the integers 2 and 9 (as opposed to for example 1 and 2) to designate two different subentities. The docs say that later on they would say why they used those two integers, but never do... What's that all about? The example in the wiki does not mention this, but then again it does not mention much at all...
All that matters is that you have some restricting qualifier that specifies how to differentiate the two entities (the value doesn't matter, but you do need some attribute that specifies which one is a SubEntity1 and which one is a SubEntity2). If you use Wonder, I recommend turning on er .extensions .ERXEnterpriseObject.applyRestrictingQualifierOnInsert=true . If you don't, you will also need to set the value of your restricting qualifier in your awakeFromInsertion so new objects of your entity type get assigned properly (meaning, if you have a type = 2 restricting qualifier, you need to setType(2) in awakeFromInsertion). applyRestrictingQualifierOnInsert in Wonder will automagically look at your restricting qualifier and figure out what to set for you, so it's just one less thing to mess up.

ms

_______________________________________________
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: Inheritance...
      • From: Chuck Hill <email@hidden>
    • Re: Inheritance...
      • From: Florijan Stamenkovic <email@hidden>
References: 
 >Inheritance... (From: Florijan Stamenkovic <email@hidden>)
 >Re: Inheritance... (From: Chuck Hill <email@hidden>)
 >Re: Inheritance... (From: Mike Schrag <email@hidden>)
 >Re: Inheritance... (From: Florijan Stamenkovic <email@hidden>)
 >Re: Inheritance... (From: Florijan Stamenkovic <email@hidden>)
 >Re: Inheritance... (From: Ken Anderson <email@hidden>)
 >Re: Inheritance... (From: Florijan Stamenkovic <email@hidden>)

  • Prev by Date: JBoss and WebObject
  • Next by Date: Re: Inheritance...
  • Previous by thread: Re: Inheritance...
  • Next by thread: Re: Inheritance...
  • Index(es):
    • Date
    • Thread