• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Core Data: Delete stops at first object in Cascade
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Core Data: Delete stops at first object in Cascade (From: Jerry Krinock <email@hidden>)
 >Re: Core Data: Delete stops at first object in Cascade (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: enabling Edit menu items in a modal window?
  • Next by Date: Rotate NSImage to get a new NSImage, without drawing
  • Previous by thread: Re: Core Data: Delete stops at first object in Cascade
  • Next by thread: applicationShouldOpenUntitledFile in Core Data App?
  • Index(es):
    • Date
    • Thread