Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Fluegge2010-01-11 19:31:15 +0000
committerMartin Fluegge2010-01-11 19:31:15 +0000
commit96f64df9f09c6a16193f957522bf76af7bb0a3f7 (patch)
treee719f03394a22b0b858a6046b978694fb77e3195 /plugins/org.eclipse.emf.cdo/src/org
parent6ce1b84e5b559e5832a0f4e32cf0390b4863548a (diff)
downloadcdo-96f64df9f09c6a16193f957522bf76af7bb0a3f7.tar.gz
cdo-96f64df9f09c6a16193f957522bf76af7bb0a3f7.tar.xz
cdo-96f64df9f09c6a16193f957522bf76af7bb0a3f7.zip
[299190] CDOResourceImpl problem with containment references
https://bugs.eclipse.org/bugs/show_bug.cgi?id=299190
Diffstat (limited to 'plugins/org.eclipse.emf.cdo/src/org')
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java18
1 files changed, 13 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
index 031cdf0485..5f7a35b575 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
@@ -344,7 +344,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
/**
* It is really important for accessing the data to go through {@link #cdoStore()}. {@link #eStore()} will redirect
* you to the transient data.
- *
+ *
* @since 2.0
*/
public void cdoInternalPostDetach(boolean remote)
@@ -603,7 +603,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
* Code took from {@link BasicEObjectImpl#eBasicSetContainer} and modify it to detect when object are moved in the
* same context. (E.g.: An object is moved from resA to resB. resA and resB belongs to the same CDORepositoryInfo.
* Without this special handling, a detach and newObject will be generated for the object moved)
- *
+ *
* @since 2.0
*/
@Override
@@ -696,7 +696,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
/**
* Code took from {@link BasicEObjectImpl#eSetResource} and modify it to detect when object are moved in the same
* context.
- *
+ *
* @since 2.0
*/
@Override
@@ -707,7 +707,15 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
CDOView oldView = view;
CDOView newView = resource != null && resource instanceof CDOResource ? ((CDOResource)resource).cdoView() : null;
- boolean isSameView = oldView != null && oldView == newView;
+ boolean isSameView ;
+ if (state == CDOState.NEW)
+ {
+ isSameView = false;
+ }
+ else
+ {
+ isSameView = oldView != null && oldView == newView;
+ }
if (oldResource != null)
{
@@ -1425,7 +1433,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
/**
* TODO Remove this when EMF has fixed bug 197487
- *
+ *
* @author Eike Stepper
*/
public class CDOStoreFeatureMap extends DelegatingFeatureMap

Back to the top