Re: NSManagedObject Initialization Methods Not Called
Re: NSManagedObject Initialization Methods Not Called
- Subject: Re: NSManagedObject Initialization Methods Not Called
- From: Chris Hanson <email@hidden>
- Date: Wed, 23 Sep 2009 12:59:18 -0700
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@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