Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaspar De Groot2011-04-20 03:03:45 +0000
committerCaspar De Groot2011-04-20 03:03:45 +0000
commit26b1130a7ddb6c42076ba8e09a5be8cf8ed5d92d (patch)
tree79663d8d64537659b6a4a8550320a38cb7b514a1 /plugins/org.eclipse.emf.cdo
parent5f43070587ad5be784224fb7fb4ca27950b2cd17 (diff)
downloadcdo-26b1130a7ddb6c42076ba8e09a5be8cf8ed5d92d.tar.gz
cdo-26b1130a7ddb6c42076ba8e09a5be8cf8ed5d92d.tar.xz
cdo-26b1130a7ddb6c42076ba8e09a5be8cf8ed5d92d.zip
[Bug 341875] Unsetting container ref not working correctly for NEW objects if resolveProxies=true
https://bugs.eclipse.org/bugs/show_bug.cgi?id=341875
Diffstat (limited to 'plugins/org.eclipse.emf.cdo')
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDOLegacyWrapper.java47
1 files changed, 21 insertions, 26 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDOLegacyWrapper.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDOLegacyWrapper.java
index 663f35686e..3a6d975c36 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDOLegacyWrapper.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDOLegacyWrapper.java
@@ -195,13 +195,6 @@ public abstract class CDOLegacyWrapper extends CDOObjectWrapper
EClass eClass = revision.getEClass();
- CDOStore store = view.getStore();
- InternalEObject eContainer = store.getContainer(this);
- if (eContainer != null && eContainmentFeature().isResolveProxies())
- {
- adjustOppositeReference(this, eContainer, eContainmentFeature());
- }
-
// This loop adjusts the opposite wrapper objects to support dangling references. See Bugzilla_251263_Test
for (EStructuralFeature feature : CDOModelUtil.getAllPersistentFeatures(eClass))
{
@@ -959,25 +952,27 @@ public abstract class CDOLegacyWrapper extends CDOObjectWrapper
return wrapperRegistry.get().containsKey(wrapper.cdoID());
}
- private void adjustOppositeReference(InternalCDOObject cdoObject, EObject oppositeObject, EReference oppositeReference)
- {
- if (oppositeObject != null)
- {
- InternalCDOObject oppositeCDOObject = (InternalCDOObject)CDOUtil.getCDOObject(oppositeObject);
-
- if (!FSMUtil.isTransient(oppositeCDOObject) && !EMFUtil.isPersistent(oppositeReference))
- {
- adjustPersistentOppositeReference(cdoObject, oppositeObject, oppositeReference);
- }
- else
- {
- if (oppositeReference.isResolveProxies())
- {
- adjustTransientOppositeReference(instance, (InternalEObject)oppositeObject, oppositeReference);
- }
- }
- }
- }
+ // TODO: Remove this method if it is ensured that ist is not needed anymore
+ // private void adjustOppositeReference(InternalCDOObject cdoObject, EObject oppositeObject, EReference
+ // oppositeReference)
+ // {
+ // if (oppositeObject != null)
+ // {
+ // InternalCDOObject oppositeCDOObject = (InternalCDOObject)CDOUtil.getCDOObject(oppositeObject);
+ //
+ // if (!FSMUtil.isTransient(oppositeCDOObject) && !EMFUtil.isPersistent(oppositeReference))
+ // {
+ // adjustPersistentOppositeReference(cdoObject, oppositeObject, oppositeReference);
+ // }
+ // else
+ // {
+ // if (oppositeReference.isResolveProxies())
+ // {
+ // adjustTransientOppositeReference(instance, (InternalEObject)oppositeObject, oppositeReference);
+ // }
+ // }
+ // }
+ // }
private void adjustPersistentOppositeReference(InternalCDOObject cdoObject, EObject oppositeObject,
EReference oppositeReference)

Back to the top