Adriana
Adriana

Reputation: 806

Core Data - Delete rule

I'm following Apple's documentation about Relationships. In their example, a Department has a to-many relationship to the Employees that work in a Department, and there is an inverse relationship from an Employee to the Department.

What should be the delete rule from Employee to Department? When I delete an employee, I don't want to change anything in the department, so the rule would be "No Action", which gives me a warning. I suppose I'm missing something here.

Upvotes: 3

Views: 2848

Answers (1)

diederikh
diederikh

Reputation: 25271

Nullify, which means that if a department is deleted the relationship on the Employee site will be set to nil.

Upvotes: 3

Related Questions