Re: EOSharedEditingContext and ObjectsChangedInStoreNotification
Re: EOSharedEditingContext and ObjectsChangedInStoreNotification
- Subject: Re: EOSharedEditingContext and ObjectsChangedInStoreNotification
- From: Hunter Hillegas <email@hidden>
- Date: Tue, 14 Sep 2004 10:41:17 -0700
Is the below true? If so, is it a bug?
It seems to be opposed by Apple's docs on EOSharedEditingContext:
"It is possible to modify shared objects while an application is
running, but only indirectly. A regular editing context can be created
that doesn't share objects by setting it's sharedEditingContext to
null. Fetch the object that is to be changed into the regular context,
modify or delete it, and save. Since shared editing contexts listen for
ObjectsChangedInStoreNotifications, the shared editing context updates
when it learns that an object was modified. The shared context removes
from its objectsByEntityName and
objectsByEntityNameAndFetchSpecificationName dictionaries any objects
that have been deleted, and it refaults any objects that have been
updated. However, to register newly inserted objects in the shared
editing context, it should be refetched."
http://developer.apple.com/documentation/WebObjects/Reference/API/com/
webobjects/eocontrol/EOSharedEditingContext.html
On Sep 14, 2004, at 8:24 AM, Dov Rosenberg wrote:
On 9/14/04 9:21 AM, "Karl Gretton" <email@hidden> wrote:
Dov is right. If you change an object after taking a local copy into
an EC with the shared editing context set to null, no notification is
sent to the shared EC and it will not reflect the update. You must
specifically retrieve the EO into the shared EO using a regular fetch
specification.
Karl
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden