Possible Duplicate:
Does every Core Data Relationship have to have an Inverse?
I have the following entities with the relationships:

A CombinedSH must have a Subject and a StudyHour.
A Subject must NOT have a CombinedSH.
A StudyHour must NOT have a CombinedSH.
In my app, it does not make sense that a Subject / a StudyHour will have a CombinedSH.
The problem is that Xcode gives me the following warnings:
warning: Misconfigured Property: CombinedSH.studyHour should have an inverse.
warning: Misconfigured Property: CombinedSH.subject should have an inverse.
So Xcode says that there should be an inverse – but in my app it doesn’t make sense.
What should I do?
You can define the inverse relationship from
SubjecttoCombinedSHand mark it as “optional”. Then a “Subject” need not have a “CombinedSH”.Doing so makes Xcode happy, but has also another advantage. Assume you have objects
and
What happens, if
s1is deleted? Without inverse relationship,csh1.subjectwould point to some deleted object.But if you define the inverse relationship, and set the “Delete Rule” of that relationship to “Nullify”, then deleting
s1automatically setsand therefore
subjectcannot point to a deleted object anymore.