Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Table does not have an inverse; this is an advanced setting (no object can be in multiple destinations for a specific relationship)

I have three tables in my Core Data db. EntityManagedObject, InitiativeManagedObject, ObjectiveManagedObject. There is a 1-2-M relationship between Entity and Initiative; Entity and Objective and Entity and Entity.

I have configured the relationship to be 'to many' but I have not set an inverse relationship because I don't want an inverse relationship. I can't have an inverse relationship anyway for initiatives and objectives the designer doesn't allow it, however it does allow it for entity to entity.

The problem is I am getting these warnings:

EntityManagedObject.entities does not have an inverse; this is an advanced setting (no object can be in multiple destinations for a specific relationship)

EntityManagedObject.initiatives does not have an inverse; this is an advanced setting (no object can be in multiple destinations for a specific relationship)

EntityManagedObject.objectives does not have an inverse; this is an advanced setting (no object can be in multiple destinations for a specific relationship)

like image 579
TheLearner Avatar asked Sep 28 '11 09:09

TheLearner


1 Answers

I was a bit confused by the inverse relationships at first but it makes sense. I know you are not supposed to think too much in terms of relational databases but in this case I find it helps me.

+--------+     +------------+
|        |    /|            |
| Entity |-----| Initiative |
|        |    \|            |
+--------+     +------------+

Looking at the diagram you would say

  • An Entity has many Initiatives
  • An Initiave has one Entity

So those are the two relationships you need to set up.

  • Entity 'to many' Initiatives
  • Initiative 'to one' Entity
like image 154
Paul.s Avatar answered Oct 18 '22 14:10

Paul.s