Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/model/CDOClassInfoImpl.java11
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java13
2 files changed, 13 insertions, 11 deletions
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/model/CDOClassInfoImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/model/CDOClassInfoImpl.java
index 8995c32513..9f7d5b67e5 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/model/CDOClassInfoImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/model/CDOClassInfoImpl.java
@@ -79,15 +79,8 @@ public class CDOClassInfoImpl extends AdapterImpl implements CDOClassInfo
public int getFeatureIndex(EStructuralFeature feature)
{
- try
- {
- int featureID = getEClass().getFeatureID(feature);
- return getFeatureIndex(featureID);
- }
- catch (ArrayIndexOutOfBoundsException ex)
- {
- throw new IllegalStateException("Feature not mapped: " + feature, ex); //$NON-NLS-1$
- }
+ int featureID = getEClass().getFeatureID(feature);
+ return getFeatureIndex(featureID);
}
public int getFeatureIndex(int featureID)
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
index 3dfba47f4a..f4035392db 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
@@ -2082,11 +2082,20 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa
{
EReference reference = (EReference)it.feature();
+ // Don't touch derived references -- user app might not like this.
+ // And don't touch unchangeable references either.
+ if (reference.isDerived() || !reference.isChangeable())
+ {
+ continue;
+ }
+
// In the case of DIRTY, we must investigate further: Is the referencer dirty
// because a reference to the referencedObject was added? Only in this case
// should we remove it. If this is not the case (i.e. it is dirty in a different
- // way, we must ignore it.)
- if (referencer.cdoState() == CDOState.DIRTY)
+ // way), we skip it. (If the reference is not persistent, then this exception
+ // doesn't apply: it must be removed for sure.)
+ //
+ if (referencer.cdoState() == CDOState.DIRTY && EMFUtil.isPersistent(reference))
{
InternalCDORevision cleanRevision = getSession().getRevisionManager().getRevisionByVersion(
referencer.cdoID(), referencer.cdoRevision(), CDORevision.UNCHUNKED, true);

Back to the top