Reputation: 21
I have an NSManagedObject who has a one to many relationship with the parent Object. How can I get the parent object using the child object?
Upvotes: 1
Views: 1774
Reputation: 46718
You can set up a @property
to access it and then call the @property
id parent = [myChild parent];
Or you can access it via KVC
id parent = [myChild valueForKey:@"parent"];
Upvotes: 1