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.
This commit is contained in:
Michael Bayne
2007-08-24 01:07:45 +00:00
parent be3649908b
commit cd6410ad7d
@@ -44,6 +44,8 @@ import com.samskivert.jdbc.depot.clause.Where;
import com.samskivert.jdbc.depot.expression.SQLExpression; import com.samskivert.jdbc.depot.expression.SQLExpression;
import com.samskivert.jdbc.depot.operator.Logic.*; 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 * This class implements the functionality required by {@link DepotRepository#findAll): fetch
* a collection of persistent objects using one of two included strategies. * a collection of persistent objects using one of two included strategies.
@@ -131,9 +133,9 @@ public abstract class FindAllQuery<T extends PersistentRecord>
cnt ++; cnt ++;
} }
if (cnt != fetchKeys.size()) { if (cnt != fetchKeys.size()) {
throw new SQLException( log.warning("Row count mismatch in second pass " +
"Row count mismatch in second pass [expectedCount=" + fetchKeys.size() + "[expectedCount=" + fetchKeys.size() +
", actualCount=" + cnt + "]"); ", actualCount=" + cnt + "]");
} }
} finally { } finally {
@@ -143,7 +145,10 @@ public abstract class FindAllQuery<T extends PersistentRecord>
List<T> result = new ArrayList<T>(); List<T> result = new ArrayList<T>();
for (Key<T> key : allKeys) { for (Key<T> key : allKeys) {
result.add(entities.get(key)); T value = entities.get(key);
if (value != null) {
result.add(value);
}
} }
return result; return result;
} }