• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSManagedObject Initialization Methods Not Called
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSManagedObject Initialization Methods Not Called (From: Richard Somers <email@hidden>)

  • Prev by Date: Re: [OT] Re: Creator Codes in Snow Leopard
  • Next by Date: base32
  • Previous by thread: Re: NSManagedObject Initialization Methods Not Called
  • Next by thread: Why am I always getting the linker error: 'duplicate symbol'...?
  • Index(es):
    • Date
    • Thread