Let's note what we're doing here.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2217 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
zell
2007-08-27 16:22:46 +00:00
parent 85fe8b09c3
commit f2e59a1107
@@ -114,6 +114,7 @@ public abstract class FindAllQuery<T extends PersistentRecord>
SQLExpression condition;
if (_marsh.getPrimaryKeyFields().length == 1) {
// Single-column keys result in the compact IN(keyVal1, keyVal2, ...)
Comparable[] keyFieldValues = new Comparable[fetchKeys.size()];
for (int ii = 0; ii < keyFieldValues.length; ii ++) {
keyFieldValues[ii] = fetchKeys.get(ii).condition.getValues()[0];
@@ -121,6 +122,7 @@ public abstract class FindAllQuery<T extends PersistentRecord>
condition = new In(_type, _marsh.getPrimaryKeyFields()[0], keyFieldValues);
} else {
// Multi-column keys result in OR'd AND's, of unknown efficiency (TODO check).
SQLExpression[] keyArray = new SQLExpression[fetchKeys.size()];
for (int ii = 0; ii < keyArray.length; ii ++) {
keyArray[ii] = fetchKeys.get(ii).condition;