2

I have an Entity in my Core Data model that contains a reference to itself. i.e. A Page can have a child collection of pages. When compiling i get the warning:

"Page.pages -- to-many relationship does not have an inverse: this is an advanced setting (no object can be in multiple destinations for a specific relationship)"

Now I have read that core data requires an inverse relationship to maintain integrity and would like to provide this. I don't mind my data model being changed it is an early stage of development. What is an appropriate way of dealing with this situation?

alt text

Aran Mulholland
  • 23,555
  • 29
  • 141
  • 228

2 Answers2

6

(By request of @Aran)

Well, if the warning is that Pages.pages doesn't have an inverse relationship, have you tried adding an inverse relationship? (Maybe Pages.parent?)

Dave DeLong
  • 242,470
  • 58
  • 448
  • 498
0

Select the pages relationship and set the inverse relationship to pages also.

edit: nvm thats if a page has more than one parent.

mackross
  • 2,234
  • 17
  • 19