summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2006-05-29 03:14:06 (EDT)
committerEike Stepper2006-05-29 03:14:06 (EDT)
commit7b7b446141126568f85d53440d5ef3287cb06b0f (patch)
tree7d60d7234e65e121f23de47a2c5aba8ea813b0f6
parent3a9f7ffb57be5eb7ce3d4ae1902a69efd0bb1c59 (diff)
downloadcdo-7b7b446141126568f85d53440d5ef3287cb06b0f.zip
cdo-7b7b446141126568f85d53440d5ef3287cb06b0f.tar.gz
cdo-7b7b446141126568f85d53440d5ef3287cb06b0f.tar.bz2
Bug 143956.
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/MapperImpl.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/SQLConstants.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CommitTransactionIndication.java2
3 files changed, 8 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/MapperImpl.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/MapperImpl.java
index 24865d2..0ad194a 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/MapperImpl.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/MapperImpl.java
@@ -603,7 +603,7 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
StringBuffer query = new StringBuffer("DELETE FROM ");
query.append(tableName);
query.append(" WHERE ");
- query.append(OBJECT_OID_COLUMN);
+ query.append(USER_OID_COLUMN);
query.append("=");
query.append(oid);
@@ -795,7 +795,7 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
{
final ClassInfo finalClassInfo = classInfo;
String sql = "SELECT " + columnNames + " FROM " + classInfo.getTableName() + " WHERE "
- + OBJECT_OID_COLUMN + "=?";
+ + USER_OID_COLUMN + "=?";
Object[] args = { new Long(oid)};
if (isDebugEnabled()) debug(StringHelper.replaceWildcards(sql, "?", args));
@@ -859,7 +859,7 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
private void createAttributeTable(ClassInfo classInfo, Database database)
{
Table segmentTable = database.addTable(classInfo.getTableName());
- segmentTable.addColumn(OBJECT_OID_COLUMN, ColumnType.BIGINT_LITERAL, "NOT NULL");
+ segmentTable.addColumn(USER_OID_COLUMN, ColumnType.BIGINT_LITERAL, "NOT NULL");
AttributeInfo[] attributeInfos = classInfo.getAttributeInfos();
for (int i = 0; i < attributeInfos.length; i++)
@@ -871,6 +871,6 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
segmentTable.addColumn(columnName, columnType);
}
- segmentTable.addSimpleIndex(OBJECT_OID_COLUMN, IndexType.PRIMARY_LITERAL);
+ segmentTable.addSimpleIndex(USER_OID_COLUMN, IndexType.PRIMARY_LITERAL);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/SQLConstants.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/SQLConstants.java
index 738d1fe..ac42d71 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/SQLConstants.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/SQLConstants.java
@@ -90,6 +90,9 @@ public interface SQLConstants
public static final String REFERENCE_TARGET_COLUMN = "TARGET" + OBJECT_OID_COLUMN;
//--------------------------------------------------------------------
+ public static final String USER_OID_COLUMN = "___" + OBJECT_OID_COLUMN + "___";
+
+ //--------------------------------------------------------------------
public static final String SELECT_PACKAGES = "SELECT " + PACKAGE_PID_COLUMN + ", "
+ PACKAGE_NAME_COLUMN + " FROM " + PACKAGE_TABLE;
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CommitTransactionIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CommitTransactionIndication.java
index 0a95cd8..f562b16 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CommitTransactionIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CommitTransactionIndication.java
@@ -538,7 +538,7 @@ public class CommitTransactionIndication extends AbstractIndicationWithResponse
}
sql.append(" WHERE ");
- sql.append(SQLConstants.OBJECT_OID_COLUMN);
+ sql.append(SQLConstants.USER_OID_COLUMN);
sql.append("=?");
getMapper().sql(sql.toString(), args);