Re: Core Data relationship fault
Re: Core Data relationship fault
- Subject: Re: Core Data relationship fault
- From: Jerry Krinock <email@hidden>
- Date: Mon, 11 Apr 2011 11:48:16 -0700
On 2011 Apr 11, at 09:54, Lynn Barton wrote:
> Can someone point me to an example or tutorial that shows how to get the value of a to-many relationship attribute of a Core Data entity? My application is simple and comparable to the Departments and Employees example in Apple's documents.
You just answered you own question ;)
> When I select a "department" object I have no trouble accessing any of its other properties, but when I try to get its "employees" I get only a relationship fault.
> I am trying to calculate a transient property
I'd bet that's the problem. In my experience, transient properties are all pain (lotsa gotchas) with no (performance) gain. Consider either making it a regular property, or, probably better for your case since a table view can only show several tens of rows at a time, calculating it as a derived attribute. For the latter, remember your friend +keyPathsForValuesAffecting<Foo>.
_______________________________________________
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