summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-01-17 11:19:58 (EST)
committerEike Stepper2008-01-17 11:19:58 (EST)
commitaed931f080a40cd590b366392c00ffb4266f8e46 (patch)
tree36d43c6124081d4cdcc4bad17da18045fb9d90df
parent41fe42f734bcbdb0f151a449beaaec5ffc19dcac (diff)
downloadcdo-aed931f080a40cd590b366392c00ffb4266f8e46.zip
cdo-aed931f080a40cd590b366392c00ffb4266f8e46.tar.gz
cdo-aed931f080a40cd590b366392c00ffb4266f8e46.tar.bz2
[214374] Sending deltas doesn't adjust CDOIDs
https://bugs.eclipse.org/bugs/show_bug.cgi?id=214374
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaTest.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaTest.java
index aac0c56..19fd347 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaTest.java
@@ -152,7 +152,35 @@ public class RevisionDeltaTest extends AbstractCDOTest
transaction.close();
session.close();
}
+ /**
+ * CDOView.getRevision() does not work for transactions/dirty objects (INVALID)
+ *
+ * @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=214374
+ */
+ public void testBugzilla214374_HandleClear() throws Exception
+ {
+ CDOSession session = openModel1Session();
+ CDOTransaction transaction = session.openTransaction();
+ CDOResource resource = transaction.createResource("/test1");
+ Customer customer = Model1Factory.eINSTANCE.createCustomer();
+ resource.getContents().add(customer);
+
+
+ SalesOrder salesOrder = Model1Factory.eINSTANCE.createSalesOrder();
+ resource.getContents().add(salesOrder);
+ customer.getSalesOrders().add(salesOrder);
+ customer.getSalesOrders().add(salesOrder);
+ transaction.commit();
+
+ customer.getSalesOrders().add(salesOrder);
+ customer.getSalesOrders().clear();
+ customer.getSalesOrders().add(salesOrder);
+
+ transaction.commit();
+ transaction.close();
+ session.close();
+ }
private CDORevisionImpl getCopyCDORevision(Object object)
{
return new CDORevisionImpl((CDORevisionImpl)((InternalCDOObject)object).cdoRevision());