Re: EOs waking repeatedly
Re: EOs waking repeatedly
- Subject: Re: EOs waking repeatedly
- From: Jonathan Rochkind <email@hidden>
- Date: Mon, 23 Feb 2004 10:59:02 -0600
I do not believe it is normal for awakeFromFetch to be called twice
for a single 'fetch', no. One exception may be using nested editing
contexts---it will called once for the fetch into the 'parent' EC,
and once for the fetch into the 'child' EC----because, in fact,
awakeFromFetch is being called on two different objects here. The EO
in the parent EC is a different object than the EO in the child, even
though they both represent the same row in the db.
I'm not sure what's going on with you, but could it be related to the
java client? I don't have experience with java client apps. But is
it possible awakeFromFetch is being called once for the EO on the
server side, and once for the EO on the client side? With these
being two different EOs representing the same row in db, similar to
the parent/child EC situation?
I'd check the actual _object_ awakeFromFetch is being called on, to
see if it is in fact two different objects (representing the same db
row), rather than awakeFromFetch being called twice on the same EO
object. Although it being called hundreds of times would be more
mysterious. But to figure this out, I think you need to dig deeper
than just keeping a count of awakeFromFetch calls; you need to figure
out _what_ objects are having awakeFromFetch called on them, to try
and figure out why. You could look at the call stack trace for each
awakeFromFetch invocation to give additional info about why it's
being called too.
--Jonathan
At 9:24 AM +1300 2/21/04, Ray Ackland wrote:
Is it normal for an entity to be repeatedly inserted into an editing
context. Using a static counter in an awakeFromFetch method, it
seems that the routine is getting called repeatedly - usually twice,
but sometimes hundreds of times.
It is being called with the same ec most of the times as well
(although some calls are coming from insertion into different ecs).
I am wanting to know if this is normal - in which case what impact
does that have on methods I call in there, or if I have created some
sort of loop.
In case it is relevant, I have this routine on the client side of a D2J app.
Thanks,
r.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.