oops, EditingContext disposed?
oops, EditingContext disposed?
- Subject: oops, EditingContext disposed?
- From: Amedeo Mantica <email@hidden>
- Date: Tue, 24 Feb 2009 17:22:59 +0100
This is new to me....
public void setIsPrimoPiano(Boolean value) { if (value) { EOEditingContext ec = new EOEditingContext(); ec.setSharedEditingContext(null); // I set null to shared EO because i fetch all in application LINE 42 ---> NSArray<CFArticle> array = (NSArray<CFArticle>)EOUtilities.objectsMatchingKeyAndValue(ec, "CFArticle", "isPrimoPiano", true); if (array!=null) { for (int i=0 ; i < array.count() ; i++) { array.objectAtIndex(i).setIsPrimoPiano(false); } } ec.saveChanges(); } super.setIsPrimoPiano(value); }
Attempt to access an EO that has either not been inserted into any EOEditingContext or its EOEditingContext has already been disposed
com.webobjects.eocontrol.EOCustomObject.willRead(EOCustomObject.java:1158) com.webobjects.eocontrol._EOMutableKnownKeyDictionary$Initializer$_GenericRecordBinding.valueInObject(_EOMutableKnownKeyDictionary.java:570) com.webobjects.eocontrol._EOMutableKnownKeyDictionary$Initializer$_LazyGenericRecordBinding.valueInObject(_EOMutableKnownKeyDictionary.java:613) com.webobjects.eocontrol.EOCustomObject.storedValueForKey(EOCustomObject.java:1634) it.chieti.confindustria._CFArea.articles(_CFArea.java:103) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) com.webobjects.foundation.NSKeyValueCoding$ValueAccessor$1.methodValue(NSKeyValueCoding.java:636) com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1134) com.webobjects.eocontrol.EOCustomObject.valueForKey(EOCustomObject.java:1498) er.extensions.eof.ERXGenericRecord$InverseRelationshipUpdater.takeStoredValueForKey(ERXGenericRecord.java:1431) er.extensions.eof.ERXGenericRecord.takeStoredValueForKey(ERXGenericRecord.java:1217) com.webobjects.eocontrol.EOKeyValueCoding$_StoredForwardingBinding.setValueInObject(EOKeyValueCoding.java:240) com.webobjects.eoaccess.EODatabaseContext.initializeObjectRowEntityEditingContext(EODatabaseContext.java:2246) com.webobjects.eoaccess.EODatabaseContext.initializeObject(EODatabaseContext.java:3581) com.webobjects.eocontrol.EOObjectStoreCoordinator.initializeObject(EOObjectStoreCoordinator.java:597) com.webobjects.eocontrol.EOEditingContext.initializeObject(EOEditingContext.java:3768) com.webobjects.eoaccess.EODatabaseChannel$_EODatabaseChannelFetchResult.initializeObjects(EODatabaseChannel.java:496) com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java:3090) com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(EODatabaseContext.java:3195) com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:488) com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4069) com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4444) com.webobjects.eoaccess.EOUtilities.objectsMatchingValues(EOUtilities.java:216) com.webobjects.eoaccess.EOUtilities.objectsMatchingKeyAndValue(EOUtilities.java:190) it.chieti.confindustria.CFArticle.setIsPrimoPiano(CFArticle.java:42)
|
_______________________________________________
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