Re: Core Data: Delete stops at first object in Cascade
Re: Core Data: Delete stops at first object in Cascade
- Subject: Re: Core Data: Delete stops at first object in Cascade
- From: Jerry Krinock <email@hidden>
- Date: Sat, 28 Feb 2009 18:39:20 -0800
I found the reason why my Cascade Delete was not cascading past the
first object...
Cascade---> Cascade-->> Nullify--->
-->> X B T J <<--
<<--Nullify <---Nullify <<--Cascade
From logging the NSManagedObjectContextObjectsDidChangeNotification,
I found that the T object ^really^was^ being deleted when its X was
deleted. But it did not disappear from my popup because I had
neglected to implement a keyPathsForValuesAffecting<Key> for the
t_ordered key to which it was bound, to say that t affected
t_ordered. So the view's binding didn't observe the deletion.
But this does not explain why the T object was still in the store file
when I did a Save As and led me to believe that it was not being
deleted. My guess is that because this view binding was
bidirectional, while doing some pre-save cleanup, Core Data decided to
re-add the T object from the view back into the model.
_______________________________________________
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