• 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
Core Data: fetching keypaths through abstract entities
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data: fetching keypaths through abstract entities


  • Subject: Core Data: fetching keypaths through abstract entities
  • From: David Riggle <email@hidden>
  • Date: Sun, 19 Oct 2008 15:00:21 -0700

I want to use a keypath that goes through an abstract entity down into a concrete sub-entity. For example, given this data model:

Abstract entity: person
Concrete sub-entities: man, woman

Abstract entity: club
  relationship: members (->> person)
Concrete sub-entities: allMale, coed

I want to specify a fetch request like so:

Entity: "allMale"
Predicate: "ALL members.beard > 0"

Since beard is not an attribute of the abstract person entity that members points to, I get the following error at runtime:

NSInvalidArgumentException -- keypath members.beard not found in entity <NSSQLEntity allMale id=8>

Other than redesigning the data model, is there a way to specify the concrete entities that Core Data should use at each point in the keypath? I.e. something like "ALL members.(man)beard > 0"?
_______________________________________________


Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Binding across different Nib
  • Next by Date: Re: what do you use to make icons and similar?
  • Previous by thread: Re: Binding across different Nib
  • Next by thread: Pointing in the right direction for an XCode 3 pref pane.
  • Index(es):
    • Date
    • Thread