• 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 qualifier based on to many relationship
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Vertical Inheritance qualifier based on to many relationship


  • Subject: Re: Vertical Inheritance qualifier based on to many relationship
  • From: Johan Henselmans <email@hidden>
  • Date: Sat, 20 Aug 2011 10:58:53 +0200


On 20 aug. 2011, at 01:26, Chuck Hill wrote:


On 2011-08-19, at 2:46 PM, Johan Henselmans wrote:

My idea:

I have an entity contact, that gets vertically inherited into actor, employee, visitor, nicepersontoalwayinviteforfreetoanyshow, whatever, based on the role somebody/thing plays.

A contact can have different roles, which makes this contact playing actor, employee, visitor, nicepersontoalwayinviteforfreetoanyshow or whatever. So there is a m-n relation roles in a contact.

Where is Kieran?  This is his favourite question.  It sounds like you should be using the Role pattern and not inheritance.  
http://objectdiscovery.com/solutions/publications/roles/index.html



I thought I used a Role pattern. situation:
base class is contact, others are inheritances all in the same table
contact - visitor 
      -actor 
              -director
             -nice person

role class - (defined via eo) 

contact<->role m:n

I would assume that figure 13 in the article would be the most desirable solution, as the role definition is dynamic (roles can be added)


figure-13.gif

but I do not get how in that situation the specific methods and data of a specific role would then be defined. Or perhaps I miss the point?

For instance, and actor can have a relationship to a specific show, a theatergroup, a paycheck, a visitor can have visited a specific performance, etc. Where would you define that kind of behavior? 




I assumed that I should be able to create and get a visitor if I could describe in the EOModel qualifier something like roles.ROLE.name = 'visitor'

Something like this:
<PastedGraphic-3.png>
And I would create the relation to the role in the awakeFromInsertion phase of the Visitor.

Of course this is not working, (nothing ever works where I live) as I am getting

takeValueForKey(): attempt to assign value to unknown key: 'roles.ROLE.name'. This class does not have an instance variable of the name roles.ROLE.name


What is the proper incantation to do this?

I think that is not possible.  The restricting qualifier has to be evaluated on that single entity only.

Chuck

--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.    
http://www.global-village.net/products/practical_webobjects








Johan Henselmans
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

  • Follow-Ups:
    • Re: Vertical Inheritance qualifier based on to many relationship
      • From: David Avendasora <email@hidden>
    • Re: Vertical Inheritance qualifier based on to many relationship
      • From: Lachlan Deck <email@hidden>
References: 
 >Vertical Inheritance qualifier based on to many relationship (From: Johan Henselmans <email@hidden>)
 >Re: Vertical Inheritance qualifier based on to many relationship (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Vertical Inheritance qualifier based on to many relationship
  • Next by Date: Re: Vertical Inheritance qualifier based on to many relationship
  • Previous by thread: Re: Vertical Inheritance qualifier based on to many relationship
  • Next by thread: Re: Vertical Inheritance qualifier based on to many relationship
  • Index(es):
    • Date
    • Thread