On Sep 21, 2009, at 12:12 PM, Richard Somers wrote:

I have a core data document based application. When a file on the disk is opened -awakeFromInsert and -awakeFromFetch are never called for one of my NSManagedObject objects.

Why is not one of these methods getting called when the object is loaded into memory from disk?

It sounds like you’re expecting adding a persistent store to a persistent store coordinator to result in all of its managed objects being sent either -awakeFromInsert or -awakeFromFetch.

* -awakeFromInsert will only be sent to a managed object when it’s actually inserted into a managed object context, not when it’s realized from a fault.

* -awakeFromFetch will only be sent to a managed object when it’s actually realized from a fault, not when the persistent store containing it is added to a persistent store coordinator — or even when it’s fetched via a fetch request or relationship traversal.

Hope this clears things up a little.

  — Chris

_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to