CoreData many-to-many Relationship Question
CoreData many-to-many Relationship Question
- Subject: CoreData many-to-many Relationship Question
- From: Jean-Nicolas Jolivet <email@hidden>
- Date: Fri, 24 Jul 2009 13:23:44 -0400
I'm using a many-to-many relationship with CoreData and I was wondering if I
have to set or unset the relationshop both ways?
For example, let's say I have a many-to-many relationship between an
Employee entity and a Manager entity...if I do the following:
[anEmployee addManagersObject:aManager];
I add the Manager to the Employee's Managers... but is the Employee added to
the Manager's Employee automatically (in other words, is the inverse
relationshop created automatically for me, or do I also have to do:
[aManager addEmployeesObject:anEmployee];)
Same for removeManagersObject and removeEmployeesObject... can I only delete
one side of the relationship or do I have to delete both?
Hopefully my question is clear, if not let me know I'll try to explain it
better...
Jean-Nicolas Jolivet
_______________________________________________
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