On May 8, 2009, at 1:00 PM, Jerry Krinock wrote:

Conclusion. Here's what I believe to be the "missing documentation"...

***

"You can use -insertObject: to cancel a prior deletion, however if certain operations are performed after the deletion and before the restoring -insertObject:, the attributes of the deleted/inserted object will all be set to nil. These certain operations include, but may not be limited to,

  -[NSManagedObjectContext executeFetchRequest:error:]
  -[NSManagedObjectContext save:]

Regarding the former, note that the deleted objects need not be (and will not be, because they are deleted) included in the fetch results in order to have their attributes hosed.



That looks correct and a bug report/documentation enhancement request is reasonable, but note that deleted objects will only have their attributes cleared if: (a) the object is newly inserted (doesn't exist in the persistent store) and (b) no 'undo tracking event (ie user event)' occurs between the creation/insert and subsequent delete. You can trigger the same effect of an undo event boundary by calling "processPendingChanges".

- adam

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to