• 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: Vertical inheritance cascade deletes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Vertical inheritance cascade deletes


  • Subject: Re: Vertical inheritance cascade deletes
  • From: LD <email@hidden>
  • Date: Fri, 17 Jun 2005 15:47:50 +1000

Hi there,

On 17/06/2005, at 2:23 PM, Ken Anderson wrote:

I have a model that utilizes vertical inheritance (User -> Client) that is having trouble with cascade deletes. I can't seem to figure out what kind of structure EOF wants to properly delete related to-many objects when the relationship is on the parent entity.

By default, the to-many relationship will become a flattened to- many relationship from the parent entity. With this setup, when you try and delete an instance of the sub-entity, EOF crashes complaining about not being able to find a valid qualifier type (really nonsense):

Doesn't this depend on whether or not the parent entity is set to abstract? If not set as abstract then you need to supply a qualifier - otherwise there shouldn't be a problem.


See: http://developer.apple.com/documentation/WebObjects/ UsingEOModeler/index.html --> Modeling Inheritance --> Vertical Mapping --> 3:

--quote--
In the Advanced Entity Inspector, mark the parent entity as abstract if you won’t ever instantiate Person objects, as shown in Figure 6-4.
If you need to instantiate the parent entity (Person objects), however, don’t mark the parent entity as abstract. If you want to instantiate objects of the parent entity, you also need to assign a restricting qualifier to it. You need to assign a restricting qualifier to any entity in a vertical inheritance hierarchy that is not abstract and that has subentities (leaf nodes).


This is necessary so you can fetch objects of the parent type without also fetching the characteristics of the parent’s subentities. That is, when fetching Person objects, you don’t also want to fetch attributes in Person’s subclasses, Employee and Customer. You do this by assigning a restricting qualifier to the Person entity. See “Implementing a Restricting Qualifier” to learn how to do this.

I'm using vertical inheritance without a problem (my parent entities are abstract, however).

with regards,
--

Lachlan Deck

_______________________________________________
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


References: 
 >Vertical inheritance cascade deletes (From: Ken Anderson <email@hidden>)

  • Prev by Date: Re: Solutions site - feedback, please.
  • Next by Date: Re: Solutions site - feedback, please.
  • Previous by thread: Vertical inheritance cascade deletes
  • Next by thread: Re: Vertical inheritance cascade deletes
  • Index(es):
    • Date
    • Thread