Core Data help needed (relationship programmatically)
Core Data help needed (relationship programmatically)
- Subject: Core Data help needed (relationship programmatically)
- From: Ralph Manns <email@hidden>
- Date: Tue, 19 Feb 2008 23:45:47 +0100
Core Data newbie question:
I have one entity "Category" with a property "categoryName" , a one-to-
many relationship "children" and an inverse one-to-one relationship
"parent".
My question: how do I add an object and set the relationship. In
Apple's department-employee example is this done with:
NSMutableSet *employees;
employees = [department mutableSetValueForKey: @"employees"];
[employees addObject: newEmployee];
But there are two entities. How do I add a new employee and set the
manager or directReports relationship in Apple's example?
Can someone give me a hint. Thanks.
Ralph.
_______________________________________________
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