I have a one-to-many relationship in Core Data. For example, A->B where A is a department, B is employees. A department can have many employees and one employee can only have one department.
I set A->(casacade)->B, so if I delete A, all Bs will be deleted.
On the contrary, I can also delete B. In a situation when I delete the last B, is there any delete rule so that A will get deleted automatically? Or I have to delete A programmatically? Anything I should be careful about?