Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Core Data - Delete rule

Tags:

core-data

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.

like image 900
Adriana Avatar asked May 20 '26 14:05

Adriana


1 Answers

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

like image 190
diederikh Avatar answered May 22 '26 03:05

diederikh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!