Re: Parent entities
Re: Parent entities
- Subject: Re: Parent entities
- From: Dave Hayden <email@hidden>
- Date: Fri, 24 Jun 2005 15:04:36 -0700
On Jun 23, 2005, at 10:53 PM, mmalcolm crawford wrote: 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)?
The documentation doesn't say anything about what they are--what it does, or why you'd use one. I apparently guessed right, that the parents' properties are available to the child, but not having the properties in the predicate builder threw me off. I assumed there was something I missed.
I'll file the missing properties as a bug. 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.
Got it, thanks. This is all slowly coming together in my head. It's finally hit me that I'll have to go back and learn all this key-value stuff I skipped before I get any farther with CoreData. I was looking at it as just an object persistence tool, but I see there's a lot more going on under the hood that just that.
Thanks again! -Dave |
_______________________________________________
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