Deleting shared EOs?
Deleting shared EOs?
- Subject: Deleting shared EOs?
- From: Colin Clark <email@hidden>
- Date: Wed, 30 Jun 2004 14:24:57 -0400
Hi everyone,
A quick question about deleting shared objects. I have some objects in
my application that change very infrequently. They're displayed
regularly by a wide variety of users, and are only occasionally edited
at all. Perfect case for a shared editing context. On rare occasions,
however, these objects can actually be deleted by an administrative
user.
I understand that EOSharedEditingContexts are essentially read-mostly
object stores, and that in order to make changes to a shared object, it
needs to be refetched into an EC whose sharedEdtingContext() has been
set to null.
This works fine for me when modifying existing shared objects in my
application using WebObjects 5.1. Clearly, the shared editing context
picks up the change notification and adjusts its values accordingly.
However, when I try to delete an object, the EOSharedEditingContext
chokes trying to process the change. A NullPointerException is thrown
in EOSharedEditingContext._processObjectStoreChanges(). I've included
the relevant portion of the stack trace below.
So, given this problem, I have a few questions:
1. Is it possible to delete shared objects at all?
2. Is this the correct way to do it?
3. Is this just a bug in WO 5.1?
I appreciate any input anyone may have about this, particularly during
the busy WWDC week this week. I wish I could have been there this year!
Best,
Colin
-------------------
Stacktrace while trying to delete shared objects from a separate
editing context:
java.lang.NullPointerException
at
com.webobjects.eocontrol.EOSharedEditingContext._processObjectStoreChang
es(EOSharedEditingContext.java:363)
at java.lang.reflect.Method.invoke(Native Method)
at com.webobjects.foundation.NSSelector.invoke(NSSelector.java:296)
at
com.webobjects.foundation.NSSelector._safeInvokeSelector(NSSelector.java
:59)
at
com.webobjects.eocontrol.EOEditingContext._sendOrEnqueueNotification(EOE
ditingContext.java:3962)
at
com.webobjects.eocontrol.EOEditingContext._objectsChangedInStore(EOEditi
ngContext.java:2864)
---
Colin Clark
Dynamic Web and Database Lead,
Resource Centre for Academic Technology,
University of Toronto
_______________________________________________
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.