From f2e59a11077d692b43bdaa947cc0badf06de2e1f Mon Sep 17 00:00:00 2001 From: zell Date: Mon, 27 Aug 2007 16:22:46 +0000 Subject: [PATCH] Let's note what we're doing here. git-svn-id: https://samskivert.googlecode.com/svn/trunk@2217 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- src/java/com/samskivert/jdbc/depot/FindAllQuery.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/java/com/samskivert/jdbc/depot/FindAllQuery.java b/src/java/com/samskivert/jdbc/depot/FindAllQuery.java index fe514823..26e4f4e1 100644 --- a/src/java/com/samskivert/jdbc/depot/FindAllQuery.java +++ b/src/java/com/samskivert/jdbc/depot/FindAllQuery.java @@ -114,6 +114,7 @@ public abstract class FindAllQuery 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 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;