summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-08-24 05:00:51 (EDT)
committerEike Stepper2007-08-24 05:00:51 (EDT)
commit9a2b24ee2068239051edeca0e5c5b39df168acf6 (patch)
tree2cecf6341bcd8ba46ef635361cec33319604cffc
parent0967b4195daf088aa439c94fdeb6f724d97176c5 (diff)
downloadcdo-9a2b24ee2068239051edeca0e5c5b39df168acf6.zip
cdo-9a2b24ee2068239051edeca0e5c5b39df168acf6.tar.gz
cdo-9a2b24ee2068239051edeca0e5c5b39df168acf6.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMapping.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java46
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/Mapping.java82
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MappingStrategy.java46
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/StandardMappingStrategy.java320
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/VerticalMapping.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/VerticalMappingStrategy.java2
8 files changed, 97 insertions, 413 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 0d62eb1..8b1835e 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
@@ -28,13 +28,11 @@ import org.eclipse.emf.cdo.server.ISession;
import org.eclipse.emf.cdo.server.IView;
import org.eclipse.emf.cdo.server.db.IDBStoreAccessor;
import org.eclipse.emf.cdo.server.db.IMapping;
-import org.eclipse.emf.cdo.server.db.IMappingStrategy;
import org.eclipse.emf.cdo.server.internal.db.bundle.OM;
import org.eclipse.net4j.db.DBException;
import org.eclipse.net4j.db.DBUtil;
import org.eclipse.net4j.db.IDBRowHandler;
-import org.eclipse.net4j.db.IDBTable;
import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
import java.sql.Connection;
@@ -188,9 +186,9 @@ public class DBStoreAccessor implements IDBStoreAccessor
}
}
- IMappingStrategy mappingStrategy = store.getMappingStrategy();
- Collection<IDBTable> affectedTables = mappingStrategy.map(cdoPackages);
- store.getDBAdapter().createTables(affectedTables, connection);
+ // IMappingStrategy mappingStrategy = store.getMappingStrategy();
+ // Collection<IDBTable> affectedTables = mappingStrategy.map(cdoPackages);
+ // store.getDBAdapter().createTables(affectedTables, connection);
}
protected void writeClass(CDOClassImpl cdoClass)
@@ -274,8 +272,8 @@ public class DBStoreAccessor implements IDBStoreAccessor
cdoPackage.setEcore((String)values[2]);
readClasses(cdoPackage);
- CDOPackageImpl[] cdoPackages = { cdoPackage };
- store.getMappingStrategy().map(cdoPackages);
+ // CDOPackageImpl[] cdoPackages = { cdoPackage };
+ // store.getMappingStrategy().map(cdoPackages);
}
protected void readClasses(final CDOPackageImpl cdoPackage)
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMapping.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMapping.java
index 693682a..3212813 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMapping.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMapping.java
@@ -20,6 +20,7 @@ public class HorizontalMapping extends ValueMapping
public HorizontalMapping(HorizontalMappingStrategy mappingStrategy, CDOClass cdoClass)
{
super(mappingStrategy, cdoClass, cdoClass.getAllFeatures());
+ mappingStrategy.initTable(getTable(), true);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java
index 6cb9e3f..135532a 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java
@@ -11,18 +11,12 @@
package org.eclipse.emf.cdo.server.internal.db;
import org.eclipse.emf.cdo.protocol.model.CDOClass;
-import org.eclipse.emf.cdo.protocol.model.CDOFeature;
import org.eclipse.emf.cdo.server.db.IMapping;
-import org.eclipse.net4j.db.IDBField;
-import org.eclipse.net4j.db.IDBTable;
-
-import java.util.Set;
-
/**
* @author Eike Stepper
*/
-public class HorizontalMappingStrategy extends StandardMappingStrategy
+public class HorizontalMappingStrategy extends MappingStrategy
{
public HorizontalMappingStrategy()
{
@@ -38,42 +32,4 @@ public class HorizontalMappingStrategy extends StandardMappingStrategy
{
return new HorizontalMapping(this, cdoClass);
}
-
- @Override
- protected IDBField mapFeature(CDOClass cdoClass, CDOFeature cdoFeature, Set<IDBTable> affectedTables)
- {
- if (cdoClass.isAbstract())
- {
- return null;
- }
-
- if (cdoFeature.isReference())
- {
- if (cdoFeature.isMany())
- {
- return mapReference(cdoClass, cdoFeature, getToMany());
- }
- else
- {
- switch (getToOne())
- {
- case LIKE_ATTRIBUTES:
- return mapAttribute(cdoClass, cdoFeature);
- case LIKE_TO_MANY_REFERENCES:
- return mapReference(cdoClass, cdoFeature, getToMany());
- default:
- throw new IllegalArgumentException("Invalid mapping: " + getToOne());
- }
- }
- }
- else
- {
- if (cdoFeature.isMany())
- {
- throw new UnsupportedOperationException();
- }
-
- return mapAttribute(cdoClass, cdoFeature);
- }
- }
}
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/Mapping.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/Mapping.java
index ecd3fef..1e987f0 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/Mapping.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/Mapping.java
@@ -13,9 +13,7 @@ package org.eclipse.emf.cdo.server.internal.db;
import org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionImpl;
import org.eclipse.emf.cdo.protocol.model.CDOClass;
import org.eclipse.emf.cdo.protocol.model.CDOFeature;
-import org.eclipse.emf.cdo.protocol.model.CDOPackage;
import org.eclipse.emf.cdo.protocol.model.CDOType;
-import org.eclipse.emf.cdo.server.IRepository;
import org.eclipse.emf.cdo.server.db.IDBStoreAccessor;
import org.eclipse.emf.cdo.server.db.IMapping;
import org.eclipse.emf.cdo.server.db.IMappingStrategy;
@@ -225,42 +223,46 @@ public abstract class Mapping implements IMapping
throw new ImplementationError("Unrecognized CDOType: " + type);
}
- protected IDBField mapReference(CDOClass cdoClass, CDOFeature cdoFeature, ToMany mapping)
- {
- switch (mapping)
- {
- case PER_REFERENCE:
- return mapReferenceTable(cdoFeature, cdoClass.getName() + "_" + cdoFeature.getName() + "_refs", false);
- case PER_CLASS:
- return mapReferenceTable(cdoClass, cdoClass.getName() + "_refs", true);
- case PER_PACKAGE:
- CDOPackage cdoPackage = cdoClass.getContainingPackage();
- return mapReferenceTable(cdoPackage, cdoPackage.getName() + "_refs", true);
- case PER_REPOSITORY:
- IRepository repository = mappingStrategy.getStore().getRepository();
- return mapReferenceTable(repository, repository.getName() + "_refs", true);
- case LIKE_ATTRIBUTES:
- return mapReferenceSerialized(cdoClass, cdoFeature);
- default:
- throw new IllegalArgumentException("Invalid mapping: " + mapping);
- }
- }
-
- protected IDBField mapReferenceSerialized(CDOClass cdoClass, CDOFeature cdoFeature)
- {
- // TODO Implement method HorizontalMappingStrategy.mapReferenceSerialized()
- throw new UnsupportedOperationException("Not yet implemented");
- }
-
- protected IDBField mapReferenceTable(Object key, String tableName, boolean withFeature)
- {
- IDBTable table = referenceTables.get(key);
- if (table == null)
- {
- table = addReferenceTable(tableName, withFeature);
- referenceTables.put(key, table);
- }
-
- return table.getField(0);
- }
+ // protected IDBField mapReference(CDOClass cdoClass, CDOFeature cdoFeature,
+ // ToMany mapping)
+ // {
+ // switch (mapping)
+ // {
+ // case PER_REFERENCE:
+ // return mapReferenceTable(cdoFeature, cdoClass.getName() + "_" +
+ // cdoFeature.getName() + "_refs", false);
+ // case PER_CLASS:
+ // return mapReferenceTable(cdoClass, cdoClass.getName() + "_refs", true);
+ // case PER_PACKAGE:
+ // CDOPackage cdoPackage = cdoClass.getContainingPackage();
+ // return mapReferenceTable(cdoPackage, cdoPackage.getName() + "_refs", true);
+ // case PER_REPOSITORY:
+ // IRepository repository = mappingStrategy.getStore().getRepository();
+ // return mapReferenceTable(repository, repository.getName() + "_refs", true);
+ // case LIKE_ATTRIBUTES:
+ // return mapReferenceSerialized(cdoClass, cdoFeature);
+ // default:
+ // throw new IllegalArgumentException("Invalid mapping: " + mapping);
+ // }
+ // }
+ //
+ // protected IDBField mapReferenceSerialized(CDOClass cdoClass, CDOFeature
+ // cdoFeature)
+ // {
+ // // TODO Implement method HorizontalMappingStrategy.mapReferenceSerialized()
+ // throw new UnsupportedOperationException("Not yet implemented");
+ // }
+ //
+ // protected IDBField mapReferenceTable(Object key, String tableName, boolean
+ // withFeature)
+ // {
+ // IDBTable table = referenceTables.get(key);
+ // if (table == null)
+ // {
+ // table = addReferenceTable(tableName, withFeature);
+ // referenceTables.put(key, table);
+ // }
+ //
+ // return table.getField(0);
+ // }
}
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MappingStrategy.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MappingStrategy.java
index 4291476..e1af4a7 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MappingStrategy.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MappingStrategy.java
@@ -30,6 +30,14 @@ public abstract class MappingStrategy implements IMappingStrategy
private Map<String, String> properties;
+ private Precedence precedence;
+
+ private ToMany toMany;
+
+ private ToOne toOne;
+
+ private Map<Object, IDBTable> referenceTables = new HashMap();
+
public MappingStrategy()
{
}
@@ -59,6 +67,44 @@ public abstract class MappingStrategy implements IMappingStrategy
this.properties = properties;
}
+ public Precedence getPrecedence()
+ {
+ if (precedence == null)
+ {
+ String value = getProperties().get("mappingPrecedence");
+ precedence = value == null ? Precedence.STRATEGY : Precedence.valueOf(value);
+ }
+
+ return precedence;
+ }
+
+ public ToMany getToMany()
+ {
+ if (toMany == null)
+ {
+ String value = getProperties().get("toManyReferenceMapping");
+ toMany = value == null ? ToMany.PER_REFERENCE : ToMany.valueOf(value);
+ }
+
+ return toMany;
+ }
+
+ public ToOne getToOne()
+ {
+ if (toOne == null)
+ {
+ String value = getProperties().get("toOneReferenceMapping");
+ toOne = value == null ? ToOne.LIKE_ATTRIBUTES : ToOne.valueOf(value);
+ }
+
+ return toOne;
+ }
+
+ public Map<Object, IDBTable> getReferenceTables()
+ {
+ return referenceTables;
+ }
+
public IMapping getMapping(CDOClass cdoClass)
{
IMapping mapping = ClassServerInfo.getMapping(cdoClass);
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/StandardMappingStrategy.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/StandardMappingStrategy.java
deleted file mode 100644
index 72d57d8..0000000
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/StandardMappingStrategy.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2007 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.emf.cdo.server.internal.db;
-
-import org.eclipse.emf.cdo.internal.protocol.model.CDOClassImpl;
-import org.eclipse.emf.cdo.internal.protocol.model.CDOFeatureImpl;
-import org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionImpl;
-import org.eclipse.emf.cdo.protocol.CDOID;
-import org.eclipse.emf.cdo.protocol.model.CDOClass;
-import org.eclipse.emf.cdo.protocol.model.CDOFeature;
-import org.eclipse.emf.cdo.server.internal.db.bundle.OM;
-
-import org.eclipse.net4j.db.DBUtil;
-import org.eclipse.net4j.db.IDBField;
-import org.eclipse.net4j.db.IDBTable;
-import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
-import org.eclipse.net4j.util.ObjectUtil;
-
-import java.sql.Connection;
-import java.sql.Date;
-import java.text.MessageFormat;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-
-/**
- * @author Eike Stepper
- */
-public abstract class StandardMappingStrategy extends MappingStrategy
-{
- private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG, StandardMappingStrategy.class);
-
- private Precedence precedence;
-
- private ToMany toMany;
-
- private ToOne toOne;
-
- private Map<CDOClass, ClassMapping> classMappings = new HashMap();
-
- private Map<Object, IDBTable> referenceTables = new HashMap();
-
- public StandardMappingStrategy()
- {
- }
-
- public Precedence getPrecedence()
- {
- if (precedence == null)
- {
- String value = getProperties().get("mappingPrecedence");
- precedence = value == null ? Precedence.STRATEGY : Precedence.valueOf(value);
- }
-
- return precedence;
- }
-
- public ToMany getToMany()
- {
- if (toMany == null)
- {
- String value = getProperties().get("toManyReferenceMapping");
- toMany = value == null ? ToMany.PER_REFERENCE : ToMany.valueOf(value);
- }
-
- return toMany;
- }
-
- public ToOne getToOne()
- {
- if (toOne == null)
- {
- String value = getProperties().get("toOneReferenceMapping");
- toOne = value == null ? ToOne.LIKE_ATTRIBUTES : ToOne.valueOf(value);
- }
-
- return toOne;
- }
-
- // public Set<IDBTable> map(CDOPackageImpl[] cdoPackages)
- // {
- // Set<IDBTable> affectedTables = new HashSet();
- // for (CDOPackageImpl cdoPackage : cdoPackages)
- // {
- // PackageServerInfo.setSchema(cdoPackage, getSchema());
- // if (TRACER.isEnabled())
- // {
- // TRACER.format("Mapped package: {0} --> {1}", cdoPackage, getSchema());
- // }
- // }
- //
- // for (CDOPackageImpl cdoPackage : cdoPackages)
- // {
- // for (CDOClass cdoClass : cdoPackage.getClasses())
- // {
- // if (TRACER.isEnabled())
- // {
- // TRACER.format("Mapping features of class {0}", cdoClass);
- // }
- //
- // for (CDOFeature cdoFeature : cdoClass.getAllFeatures())
- // {
- // IDBField field = mapFeature(cdoClass, cdoFeature, affectedTables);
- // if (field != null)
- // {
- // ((FeatureServerInfo)cdoFeature.getServerInfo()).addField(cdoClass, field);
- // affectedTables.add(field.getTable());
- // if (TRACER.isEnabled())
- // {
- // TRACER.format("Mapped feature: {0} --> {1}", cdoFeature, field);
- // }
- // }
- // }
- // }
- // }
- //
- // return affectedTables;
- // }
- //
- // /**
- // * @param affectedTables
- // * Can be used to indicate the creation or modification of additional
- // * tables. There is no need to add the table of the returned field to
- // * this set of affected tables. The framework takes care of that.
- // */
- // protected abstract IDBField mapFeature(CDOClass cdoClass, CDOFeature
- // cdoFeature, Set<IDBTable> affectedTables);
- //
- // protected IDBField mapAttribute(CDOClass cdoClass, CDOFeature cdoFeature)
- // {
- // IDBTable table = ClassServerInfo.getTable(cdoClass);
- // if (table == null)
- // {
- // table = addTable(cdoClass);
- // initTable(table, true);
- // ClassServerInfo.setTable(cdoClass, table);
- // }
- //
- // return addField(cdoFeature, table);
- //
- // // TODO Implement method StandardMappingStrategy.mapAttribute()
- // throw new UnsupportedOperationException("Not yet implemented");
- // }
-
- protected ClassMapping getClassMapping(CDOClass cdoClass)
- {
- ClassMapping classMapping = classMappings.get(cdoClass);
- if (classMapping == null)
- {
- classMapping = new ClassMapping(cdoClass);
- classMappings.put(cdoClass, classMapping);
- for (CDOFeature feature : cdoClass.getAllFeatures())
- {
- FeatureServerInfo featureInfo = (FeatureServerInfo)feature.getServerInfo();
- IDBField field = featureInfo.getField(cdoClass);
- if (field != null)
- {
- classMapping.addFeatureMapping(feature, field);
- }
- }
- }
-
- classMapping.sortFeatureMappings();
- return classMapping;
- }
-
- @Deprecated
- public void writeRevision(Connection connection, CDORevisionImpl revision)
- {
- if (TRACER.isEnabled())
- {
- TRACER.format("Inserting revision: {0}", revision);
- }
-
- CDOClassImpl cdoClass = revision.getCDOClass();
- ClassMapping classMapping = getClassMapping(cdoClass);
- Map<IDBTable, FeatureMapping[]> tables = classMapping.getTables();
- Entry<IDBTable, FeatureMapping[]> entry = tables.entrySet().iterator().next();
- IDBTable table = entry.getKey();
-
- int i = 0;
- Object[] values = new Object[table.getFieldCount()];
- values[i++] = revision.getID().getValue();
- values[i++] = ServerInfo.getDBID(revision.getCDOClass());
- values[i++] = revision.getVersion();
- values[i++] = new Date(revision.getCreated());
- values[i++] = new Date(revision.getRevised());
- values[i++] = revision.getResourceID().getValue();
- values[i++] = revision.getContainerID().getValue();
- values[i++] = revision.getContainingFeatureID();
-
- for (CDOFeatureImpl feature : cdoClass.getAllFeatures())
- {
- Object value = revision.getValue(feature);
- if (value instanceof CDOID)
- {
- values[i++] = ((CDOID)value).getValue();
- }
- else
- {
- values[i++] = value;
- }
- }
-
- DBUtil.insertRow(connection, table, values);
- }
-
- /**
- * @author Eike Stepper
- */
- public static final class ClassMapping
- {
- private CDOClass cdoClass;
-
- private Map<IDBTable, FeatureMapping[]> tables;
-
- public ClassMapping(CDOClass cdoClass)
- {
- this.cdoClass = cdoClass;
- }
-
- public CDOClass getCdoClass()
- {
- return cdoClass;
- }
-
- public Map<IDBTable, FeatureMapping[]> getTables()
- {
- return tables;
- }
-
- public void addFeatureMapping(CDOFeature feature, IDBField field)
- {
- if (tables == null)
- {
- tables = new HashMap();
- }
-
- IDBTable table = field.getTable();
- FeatureMapping featureMapping = new FeatureMapping(feature, field);
- FeatureMapping[] featureMappings = tables.get(table);
- if (featureMappings == null)
- {
- FeatureMapping[] newFeatureMappings = { featureMapping };
- tables.put(table, newFeatureMappings);
- }
- else
- {
- FeatureMapping[] newFeatureMappings = ObjectUtil.appendtoArray(featureMappings, featureMapping);
- tables.put(table, newFeatureMappings);
- }
- }
-
- public void sortFeatureMappings()
- {
- for (Entry<IDBTable, FeatureMapping[]> entry : tables.entrySet())
- {
- FeatureMapping[] featureMappings = entry.getValue();
- Arrays.sort(featureMappings);
- }
- }
- }
-
- /**
- * @author Eike Stepper
- */
- public static final class FeatureMapping implements Comparable
- {
- private CDOFeature feature;
-
- private IDBField field;
-
- public FeatureMapping(CDOFeature feature, IDBField field)
- {
- this.feature = feature;
- this.field = field;
- }
-
- public CDOFeature getFeature()
- {
- return feature;
- }
-
- public IDBField getField()
- {
- return field;
- }
-
- public IDBTable getTable()
- {
- return field.getTable();
- }
-
- @Override
- public String toString()
- {
- return MessageFormat.format("FeatureMapping[{0}, {1}]", feature, field);
- }
-
- public int compareTo(Object o)
- {
- if (o instanceof FeatureMapping)
- {
- FeatureMapping that = (FeatureMapping)o;
- return new Integer(field.getPosition()).compareTo(that.getField().getPosition());
- }
-
- throw new IllegalArgumentException("Not a FeatureMapping: " + o);
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/VerticalMapping.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/VerticalMapping.java
index e4b2398..a6c49a3 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/VerticalMapping.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/VerticalMapping.java
@@ -28,6 +28,7 @@ public class VerticalMapping extends ValueMapping
public VerticalMapping(VerticalMappingStrategy mappingStrategy, CDOClass cdoClass)
{
super(mappingStrategy, cdoClass, cdoClass.getFeatures());
+ mappingStrategy.initTable(getTable(), false);
for (CDOClass superType : cdoClass.getSuperTypes())
{
IMapping superMapping = mappingStrategy.getMapping(superType);
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/VerticalMappingStrategy.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/VerticalMappingStrategy.java
index 47898ec..9630e97 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/VerticalMappingStrategy.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/VerticalMappingStrategy.java
@@ -19,7 +19,7 @@ import org.eclipse.net4j.db.IDBTable;
/**
* @author Eike Stepper
*/
-public class VerticalMappingStrategy extends StandardMappingStrategy
+public class VerticalMappingStrategy extends MappingStrategy
{
private IDBTable rootTable;