Closed zhima closed 9 years ago
@zhima did you manage to make it work? I'm having the same problem where mantle sets one to many right but doesn't set the inverse relationship for children objects
@alexvbush Yeah, I have figured it out. When you have configured the inverse relationship properly in core data model, then it will automatically add the inverse relation from children to parent when inserting managed objects.
Now I have two MTLModel named Parent and Children, which correspond with NSManagedObject Parent and Children.
The entity Parent has a relationship named children to Children, and Children also has an inverse relationship named parent to Parent.
I can use the
+ (NSDictionary *)relationshipModelClassesByPropertyKey
method to support Parent's children relationship, but I can'f find any method to support inverse relationship of Children.