From 9739e50761e89428e5bcc5c260ce90013937ae7b Mon Sep 17 00:00:00 2001 From: samskivert Date: Mon, 15 Sep 2008 18:33:21 +0000 Subject: [PATCH] Don't log a warning if we don't get a result for every primary key provided when we're doing a query with primary keys provided by a random caller. We have know idea where they got those keys or where they have been before we got our filthy mitts on them. git-svn-id: https://samskivert.googlecode.com/svn/trunk@2426 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- src/java/com/samskivert/jdbc/depot/FindAllQuery.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/java/com/samskivert/jdbc/depot/FindAllQuery.java b/src/java/com/samskivert/jdbc/depot/FindAllQuery.java index 30e6ba62..b9bd0f95 100644 --- a/src/java/com/samskivert/jdbc/depot/FindAllQuery.java +++ b/src/java/com/samskivert/jdbc/depot/FindAllQuery.java @@ -281,7 +281,9 @@ public abstract class FindAllQuery got.add(key); cnt++; } - if (cnt != keys.size()) { + // if we get more results than we planned, or if we're doing a two-phase query and got + // fewer, then complain + if (cnt > keys.size() || (origStmt != null && cnt < keys.size())) { log.warning("Row count mismatch in second pass", "origQuery", origStmt, "wanted", keys, "got", got, "dups", dups, new Exception()); }