Re: core data - delete of object.
Re: core data - delete of object.
- Subject: Re: core data - delete of object.
- From: Quincey Morris <email@hidden>
- Date: Mon, 17 Nov 2008 23:38:40 -0800
On Nov 17, 2008, at 22:54, John Clayton wrote:
I'm basically looking to restore some state on an object at time of
deletion, e.g.
if A is associated with B via a to-many relationship from A->B, then
when one instance of B is deleted - we need to change a property on A.
If a B is delete, what causes it to be removed from the A->B
relationship? If B's delete rule is set to "nullify" then it's
automatically removed from the relationship. Otherwise, you must be
doing something explicit to remove the deleted B from the
relationship, yes?
Either way, it sounds like you what *really* want is to know when a B
is removed from the relationship. If so, you could have A observe its
relationship property, and recalculate the dependent property when you
get a KVO notification.
That would mean you'd also do the recalculation when you remove a non-
deleted B from the relationship (if that ever happens, but if it does
you may not care).
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden