• 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: strange inheritance problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strange inheritance problem


  • Subject: Re: strange inheritance problem
  • From: David Avendasora <email@hidden>
  • Date: Fri, 19 Jun 2009 03:33:37 -0400


On Jun 19, 2009, at 2:00 AM, Tim Worman wrote:


On Jun 18, 2009, at 10:14 PM, Chuck Hill wrote:

Hi Tim,

On Jun 18, 2009, at 6:12 PM, Tim Worman wrote:

All:

I have some fetches that are not respecting the restricting qualifiers in my model for a simple inheritance structure. I'm using WO 5.4.3. This what I have:

Job >> Approver > Employee

I have subclassed Approver into PrimaryApprover and DelegateApprover with the following restricting qualifiers. I am using single table inheritance and applying a qualifier on the attribute 'foo.'

PrimaryApprover  - foo=1
DelegateApprover - foo>1

So, there also is:

Job.primaryapprovers()
Job.delegateapprovers()

Here's where I'm seeing trouble. I have a qualifier set to fetch Job entities and it is defined like so:

EOKeyValueQualifier ("primaryapprovers.employee",EOQualifier.QualifierOperatorEqual, someEmployee)

Whenever I perform a fetch against the Job entity with the above qualifier it appears to fetch against the Approver without any restricting qualifier (foo>1) being part of the fetch.

I'm guessing this is just a typo, but if you're fetching a primaryapprovers.employee, shouldn't that restricting qualifier be foo=1 ?


When I log out the sql there is no mention in it of the foo attribute.

Let's simplify. What does the SQL look like when you just follow the approvers(), primaryapprovers() and delegateapprovers() relationships? Does that get you the restricting qualifier in the SQL?


I can group two qualifiers and use an EOAndQualifier and that works, like so:

EOKeyValueQualifier ("approvers.employee",EOQualifier.QualifierOperatorEqual, someEmployee)
EOKeyValueQualifier ("approvers.foo",EOQualifier.QualifierOperatorEqual, new Integer(1))


But then I'm not leveraging the incredible work I've done to use inheritance. :-) Does anyone have any idears why I am seeing this problem?

Thanks for the help,

Tim
UCLA GSE&IS

Is Approver marked as Abstract in the model? How is the primaryapprovers relationship modeled?

Yes Approver is abstract in the model. primaryapprovers and delegateapprovers are both modeled as a to-many from Job with the destination being PrimaryApprover, DelegateApprover respectfully. It's a class property, allows nulls. Am I missing anything?



Chuck

Thanks Chuck. _______________________________________________ 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
  • Follow-Ups:
    • Re: strange inheritance problem
      • From: Tim Worman <email@hidden>
References: 
 >strange inheritance problem (From: Tim Worman <email@hidden>)
 >Re: strange inheritance problem (From: Chuck Hill <email@hidden>)
 >Re: strange inheritance problem (From: Tim Worman <email@hidden>)

  • Prev by Date: Re: strange inheritance problem
  • Next by Date: Can't make localization
  • Previous by thread: Re: strange inheritance problem
  • Next by thread: Re: strange inheritance problem
  • Index(es):
    • Date
    • Thread