Delete propagation to parent context
Delete propagation to parent context
- Subject: Delete propagation to parent context
- From: Rick Mann <email@hidden>
- Date: Mon, 09 Mar 2015 14:56:18 -0700
I have a Core Data entity with a file attribute that is a path to a file on disk. Eventually, that entity gets deleted on a private MOC.
I want to defer deleting the associated file until the main MOC is saved, so in -prepareForDeletion, I check to see if the MOC has a parent MOC, and if not, I delete the file. But at that point, it seems all the attributes have been set to nil, including the file path attribute. This seems to go against the docs which say "You can implement this method to perform any operations required before the object is deleted, such as custom propagation before relationships are torn down". In my case, the attributes are all nil, and the relationships are faults.
Am I wrong to expect the object to still have its values at this point?
--
Rick Mann
email@hidden
_______________________________________________
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