I\'ve got two Entities that I\'ll call A and B. They are configured with To-Many relationships in both directions, so A.myBs and B.myAs are both NSSets.
Here is
I found the error, if you are overriding any of these methods
// KVO change notification
- (void)willChangeValueForKey:(NSString *)key;
- (void)didChangeValueForKey:(NSString *)key;
- (void)willChangeValueForKey:(NSString *)inKey withSetMutation:(NSKeyValueSetMutationKind)inMutationKind usingObjects:(NSSet *)inObjects;
- (void)didChangeValueForKey:(NSString *)inKey withSetMutation:(NSKeyValueSetMutationKind)inMutationKind usingObjects:(NSSet *)inObjects;
it will cause NSManagedObject don't work well and the relationships won't be set correctly
Apple documentation: You must not override these methods.