summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-09-12 13:01:31 (EDT)
committerEike Stepper2007-09-12 13:01:31 (EDT)
commit529b52799ba23a9314d07b0cba955aa47f11a5d0 (patch)
tree9039d8fb73342bba6737e1bcd91ad9c774a696a9
parent8e8fa79e7ebf4b062c83e3c85e878a7a1a54cc2e (diff)
downloadcdo-529b52799ba23a9314d07b0cba955aa47f11a5d0.zip
cdo-529b52799ba23a9314d07b0cba955aa47f11a5d0.tar.gz
cdo-529b52799ba23a9314d07b0cba955aa47f11a5d0.tar.bz2
[202833] Horizontal Mapping Strategy
https://bugs.eclipse.org/bugs/show_bug.cgi?id=202833
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/ReferenceMapping.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/ReferenceMapping.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/ReferenceMapping.java
index 0b74be3..0690e59 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/ReferenceMapping.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/ReferenceMapping.java
@@ -2,6 +2,7 @@ package org.eclipse.emf.cdo.server.internal.db;
import org.eclipse.emf.cdo.internal.protocol.CDOIDImpl;
import org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionImpl;
+import org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionImpl.MoveableList;
import org.eclipse.emf.cdo.protocol.CDOID;
import org.eclipse.emf.cdo.protocol.model.CDOClass;
import org.eclipse.emf.cdo.protocol.model.CDOFeature;
@@ -83,20 +84,25 @@ public class ReferenceMapping extends FeatureMapping implements IReferenceMappin
public void readReference(IDBStoreAccessor storeAccessor, CDORevisionImpl revision, int referenceChunk)
{
+ MoveableList list = revision.getList(getFeature());
CDOID source = revision.getID();
int version = revision.getVersion();
- String where = "";
-
- String sql = createSelect(source, version, where);
+ String sql = createSelect(source, version, null);
if (TRACER.isEnabled()) TRACER.trace(sql);
ResultSet resultSet = null;
try
{
resultSet = storeAccessor.getStatement().executeQuery(sql);
- while (resultSet.next())
+ while (resultSet.next() && --referenceChunk >= 0)
{
long target = resultSet.getLong(1);
+ list.add(CDOIDImpl.create(target));
+ }
+
+ while (resultSet.next())
+ {
+ list.add(CDORevisionImpl.UNINITIALIZED);
}
}
catch (SQLException ex)