Re: awakeFromFetch : when it is called ?
Re: awakeFromFetch : when it is called ?
- Subject: Re: awakeFromFetch : when it is called ?
- From: Eric Morand <email@hidden>
- Date: Mon, 16 Jan 2006 09:39:18 +0100
Thanks mmalcolm.
I had some problem with the term "fetched". I thought the
"executeFetchRquest..." method was actually a fetch. But it is not.
The object are fecthed only when I'm trying to access its properties/
relationships.
It's perfect. My problem was due to the fact that I was trying to
access a property that was not defined on the model (I added it
myself on the class definition). So the object was NOT fetched are
awakeFromFecth not called. I've fixed it by adding the property intot
o the model and define it as transient. Now it is working perfectly :
the object is fetched when I use the get/set accessors of my property.
By the wat, are fetched and unfaulted synonyms ? It seems to me but
there may be some subtlenesses I've not yet discover.
Eric.
Le 16 janv. 06 à 00:49, mmalcolm crawford a écrit :
On Jan 15, 2006, at 1:39 PM, Eric Morand wrote:
I'm trying to use awakeFromFetch to initialize some properties on
my managed object subclass and I was wondering when it was called.
It is not the method "executeFetchRequest:..." (it works
perfectly, returns some result, but awakeFromFetch is not called)
and I don't know which other method could call awakeFromFetch ?
Per <http://developer.apple.com/documentation/Cocoa/Reference/
CoreData_ObjC/Classes/NSManagedObject.html#//apple_ref/occ/instm/
NSManagedObject/awakeFromFetch>, it gets called automatically after
an object is fetched or unfaulted...
Check that you have spelled the method name correctly (also ensure
that you invoke super...).
mmalc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
=============================================
Automator Ketchup : http://automatorketchup.blogspot.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden