I have a 1-to-many ratio in my sample application, taken from the Core Data documentation, where one manager has several employees. I get information on how to set a rule to delete relations between a manager and an employee, but what about an Employee-to-Manager relationship? If I need a case where, if ALL employees have been deleted, I want the dispatcher to be deleted as well, which deletion rule should be applied? The cascade does not make sense, because then, if one employee is removed, the manager will be deleted, even if he has other employees who are still connected. Nullify will correctly delete the relationship, but the Manager will not delete when the last employee was deleted. Am I missing something, or do I need to do something normal in this case?
source share