Search code examples
iosswiftcore-datainverse

Can you have multiple one to one relationships with the same name inverse relationship in the Core Data Model in Xcode?


When I try to make the inverse relationship of a entity equal to the same as another one to one relationship's inverse I chose, it replaces the other one I chose. Why can't I have multiple?


Solution

  • Because that's how Core Data works. A relationship may (and should) have an inverse relationship. It can't have multiple inverse relationships. If you assign an inverse where one already exists, you replace that inverse. What you're seeing is normal and expected.