> My custom NSManagedObject subclass uses awakeFromInsert and awakeFromFetch
> to setup custom object to ivar. This works as expected, but when I fetch the
> same object on secondary thread (in NSOperation), the ivar remains nil as
> awakeFromFetch is not sent...
> 
> Is NSManagedObject's awakeFromFetch supposed to be sent when fetching on
> secondary thread?

Does the secondary thread have its own private NSManagedObjectContext that you 
are using for the fetch, or are you fetching against an NSManagedObjectContext 
that was created on another thread ?  If you are using an NSOperationQueue with 
maxConcurrency > 1, then each NSOperation will need to allocate, use, and 
deallocate its own NSManagedObjectContext.

- Ben

_______________________________________________

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