Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Quick CoreData -- inverse delete rules

Quick simple question. Apple's CoreData docs explain how delete rules work on a department's employees relationship. Delete a department, and various different things can happen to the associated employees. But what about an employee's department relationship? Should I set my delete rule to No Action, since I don't want the deletion of an employee to have any effect on the department?

like image 272
ed94133 Avatar asked Dec 19 '25 17:12

ed94133


1 Answers

You usually use nullify. That just means the relationship is set to nil. If you use No Action no KVO notification is sent to the other end of the relationship. This can cause problems if objects still think they have a relationship.

like image 118
TechZen Avatar answered Dec 22 '25 17:12

TechZen



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!