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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to