Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2011-07-27 03:25:44 -0400
committerEike Stepper2011-07-27 03:25:44 -0400
commit210040128e0b19813a89826288e98dc34f6c9cf5 (patch)
treed1ff592466eb2efa62bcc28c0b7eb5ae9ce34b09
parentefe6fc873366ba5a9560c7247c75e813cdbfb8fe (diff)
downloadcdo-210040128e0b19813a89826288e98dc34f6c9cf5.tar.gz
cdo-210040128e0b19813a89826288e98dc34f6c9cf5.tar.xz
cdo-210040128e0b19813a89826288e98dc34f6c9cf5.zip
[352561] Support client assigned CDOIDs (UUIDs)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=352561
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
index 52c6ebc90e..80599796e1 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
@@ -1091,7 +1091,10 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
throws IOException
{
DBStore store = getStore();
- out.writeCDOID(store.getIDHandler().getLastObjectID()); // See bug 325097
+ if (store.getRepository().getIDGenerationLocation() == IDGenerationLocation.STORE)
+ {
+ out.writeCDOID(store.getIDHandler().getLastObjectID()); // See bug 325097
+ }
String where = " WHERE " + CDODBSchema.BRANCHES_ID + " BETWEEN " + fromBranchID + " AND " + toBranchID;
DBUtil.serializeTable(out, connection, CDODBSchema.BRANCHES, null, where);
@@ -1113,7 +1116,10 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
OMMonitor monitor) throws IOException
{
DBStore store = getStore();
- store.getIDHandler().setLastObjectID(in.readCDOID()); // See bug 325097
+ if (store.getRepository().getIDGenerationLocation() == IDGenerationLocation.STORE)
+ {
+ store.getIDHandler().setLastObjectID(in.readCDOID()); // See bug 325097
+ }
IMappingStrategy mappingStrategy = store.getMappingStrategy();
int size = mappingStrategy.getClassMappings().size();

Back to the top