Re: Parent entities
Re: Parent entities
- Subject: Re: Parent entities
- From: mmalcolm crawford <email@hidden>
- Date: Thu, 23 Jun 2005 22:53:48 -0700
On Jun 23, 2005, at 5:08 PM, Dave Hayden wrote:
First, is there a CoreData mailing list where I should be posting
this instead? I saw nothing at lists.apple.com..
This is the appropriate list.
I can't find anything useful in the documentation about parent
entities, only that you can set them in the object modeller, and..
well, yeah.
What other information do you need (serious question)?
I'm guessing that the child entity inherits its parent entity's
properties; however, I don't get these in the predicate builder
when I target the child entity. Setting and getting in code seems
to work as I expect, though. Is this an XCode bug or am I not
grasping something here?
Hmm, personally offhand I'd regard that as a bug. I can't
immediately think of a reason why you shouldn't see the inherited
properties.
Is there a way to check the entity in a fetched property? For
example, if I have an entity with a to-many relationship to "Fruit"
types and "Apple" is a child entity, can I sort out which items in
the relationship are Apples?
You can get a managed object's entity using -entity, and an entity
description object with NSEntityDescription's -
entityForName:inManagedObjectContext:. You can iterate over the
contents of the relationship testing each destination object.
mmalc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden