I have a simple Core Data model:
Entity Team (name, logo) Entity Sport (name, teams to->many Teams)
So, a Sport can have many Teams
I create the Team first, then add or edit a Sport and add the Teams. If I delete a Team, my app starts crashing. I believe because it is looking for the deleted reference.
So, how can I restrict via Core Data, not to delete an Entity which is being used as reference from another Entity's relation.
I don't want to set the relationship to nil. And I don't want to go and delete the Team from the Sport first, and then delete it alone. I just want it to notify that I can't delete it. i.e. I'm looking for a built-in checker.