Core Data Minefield

Scott Stevenson sstevenson at mac.com
Tue Feb 6 07:29:07 PST 2007


On Feb 6, 2007, at 6:35 AM, Boisy Pitre wrote:

> I would expect to see a  
> NSManagedObjectContextObjectsDidChangeNotification notification on  
> load by virtue of the fact that managed objects are being inserted  
> into the managed object context
[...]
> There are three keys that can be part of the passed userInfo  
> dictionary: inserted, updated and deleted.  When loading the data  
> from the store, are they not being inserted into the managed object  
> context?

Actually, no. Insert really means "create". If you want an object to  
do something when it is loaded, you might look at overriding - 
awakeFromFetch in NSManagedObject.

     - Scott


More information about the MacOSX-dev mailing list