From cd6410ad7dc6398326c0ea09bfff8b0009c3a0bc Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Fri, 24 Aug 2007 01:07:45 +0000 Subject: [PATCH] Let's not stick a fork in things if we don't have to. This is rendering Whirled inoperable right now, but just returning what we got would be perfectly fine. --- .../com/samskivert/jdbc/depot/FindAllQuery.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/java/com/samskivert/jdbc/depot/FindAllQuery.java b/src/java/com/samskivert/jdbc/depot/FindAllQuery.java index 5a58ae6..46d634d 100644 --- a/src/java/com/samskivert/jdbc/depot/FindAllQuery.java +++ b/src/java/com/samskivert/jdbc/depot/FindAllQuery.java @@ -44,6 +44,8 @@ import com.samskivert.jdbc.depot.clause.Where; import com.samskivert.jdbc.depot.expression.SQLExpression; import com.samskivert.jdbc.depot.operator.Logic.*; +import static com.samskivert.jdbc.depot.Log.log; + /** * This class implements the functionality required by {@link DepotRepository#findAll): fetch * a collection of persistent objects using one of two included strategies. @@ -131,9 +133,9 @@ public abstract class FindAllQuery cnt ++; } if (cnt != fetchKeys.size()) { - throw new SQLException( - "Row count mismatch in second pass [expectedCount=" + fetchKeys.size() + - ", actualCount=" + cnt + "]"); + log.warning("Row count mismatch in second pass " + + "[expectedCount=" + fetchKeys.size() + + ", actualCount=" + cnt + "]"); } } finally { @@ -143,7 +145,10 @@ public abstract class FindAllQuery List result = new ArrayList(); for (Key key : allKeys) { - result.add(entities.get(key)); + T value = entities.get(key); + if (value != null) { + result.add(value); + } } return result; }