Author: christian.bauer(a)jboss.com
Date: 2008-05-29 20:11:57 -0400 (Thu, 29 May 2008)
New Revision: 8310
Modified:
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogDAO.java
Log:
Minor bugfix
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogDAO.java
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogDAO.java 2008-05-29
17:55:17 UTC (rev 8309)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogDAO.java 2008-05-30
00:11:57 UTC (rev 8310)
@@ -148,7 +148,7 @@
List<BlogEntry> result = (List<BlogEntry>)query.list();
- if (countComments) {
+ if (countComments && result.size() > 0) {
// The risk here is that pager.getQueryMaxResults() is too large for the IN()
operator of some DBs...
StringBuilder commentQueryString = new StringBuilder();
commentQueryString.append("select doc.NODE_ID as DOC_ID,
count(c3.NODE_ID) as COMMENT_COUNT").append(" ");
Show replies by date