diff options
author | Eike Stepper | 2008-01-05 20:46:52 +0000 |
---|---|---|
committer | Eike Stepper | 2008-01-05 20:46:52 +0000 |
commit | 6be7763b64860c7db5755f28731426a2e9c67f6a (patch) | |
tree | dc2b8e768d6e72762380e3bd70a79c3e5a239aba /plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaTest.java | |
parent | c82f6a98dcad0356f5d6a25e3ff2da0adec6b0bd (diff) | |
download | cdo-6be7763b64860c7db5755f28731426a2e9c67f6a.tar.gz cdo-6be7763b64860c7db5755f28731426a2e9c67f6a.tar.xz cdo-6be7763b64860c7db5755f28731426a2e9c67f6a.zip |
[214431] CDOView.getRevision() does not work for transactions/dirty objects
https://bugs.eclipse.org/bugs/show_bug.cgi?id=214431
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaTest.java')
-rw-r--r-- | plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaTest.java | 22 |
1 files changed, 22 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 8cc6b30011..aac0c56c1e 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 @@ -131,6 +131,28 @@ public class RevisionDeltaTest extends AbstractCDOTest session.close(); } + /** + * CDOView.getRevision() does not work for transactions/dirty objects (INVALID) + * + * @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=214431 + */ + public void testBugzilla214431() throws Exception + { + CDOSession session = openModel1Session(); + CDOTransaction transaction = session.openTransaction(); + CDOResource resource = transaction.createResource("/test1"); + + SalesOrder salesOrder = Model1Factory.eINSTANCE.createSalesOrder(); + resource.getContents().add(salesOrder); + transaction.commit(); + + salesOrder.setId(4711); + assertNotSame(salesOrder.cdoRevision(), transaction.getRevision(salesOrder.cdoID())); + assertEquals(salesOrder.cdoRevision(), transaction.getDirtyObjects().get(salesOrder.cdoID()).cdoRevision()); + transaction.close(); + session.close(); + } + private CDORevisionImpl getCopyCDORevision(Object object) { return new CDORevisionImpl((CDORevisionImpl)((InternalCDOObject)object).cdoRevision()); |