diff options
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server')
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 24865d2ddd..0ad194a290 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 738d1fe8fa..ac42d7173a 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 0a95cd8426..f562b16ef5 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); |