NSManagedObjectContext -insertObject: Cancels Prior Deletion?
NSManagedObjectContext -insertObject: Cancels Prior Deletion?
- Subject: NSManagedObjectContext -insertObject: Cancels Prior Deletion?
- From: Jerry Krinock <email@hidden>
- Date: Mon, 4 May 2009 22:44:50 -0700
I have a tree of managed objects with parent <--> child relationships,
and Delete Rule set to Cascade children when a parent is deleted.
But sometimes, after deleting a parent, I need to restore a deleted
child under a new parent. So I set the new relationships and also send
[managedObjectContext insertObject:deletedObject] ;
It appears that -insertObject: "cancels" the object's previous Cascade-
deletion. It definitely does not persist as desired if I don't to this.
But of course since my situation is rather odd it is not covered in
"Creating and Deleting Managed Objects" of the "Core Data Programming
Guide". Is what I'm doing OK?
Thanks,
Jerry Krinock
_______________________________________________
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