问题
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?

回答1:
(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?)
回答2:
Select the pages relationship and set the inverse relationship to pages also.
edit: nvm thats if a page has more than one parent.
来源:https://stackoverflow.com/questions/4487657/core-data-self-referencing-table