I'm running into an issue with my core data model. I would like to have an entity called TherapySession have two Mood events - start and end. To do so I've defined two relationships to child objects:
However, I would also like to create an inverse relationship, where each Mood object would be aware of it's parent therapy session. I'm not sure how to properly create the inverse relationship between the child and parent object when there are more than one relationship of the same type defined. In my case, the inverse relationship points to the "startMood" property of the therapy session:
It seems that I'm doing something wrong, but I cannot put my finger on how to resolve this problem. If I add an end mood to therapy, and the core data would try to create an inverse relationship, would it overwrite the startMood relationship?
Thank you for any clarifications! I know that this can be avoided by adding a set of objects, and then sorting the set by date, but I would like to avoid having to do that for every object.