You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jo...@apache.org on 2012/03/14 23:12:41 UTC

svn commit: r1300757 - /ofbiz/branches/release11.04/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java

Author: jonesde
Date: Wed Mar 14 22:12:41 2012
New Revision: 1300757

URL: http://svn.apache.org/viewvc?rev=1300757&view=rev
Log:
Fixed bug when there is a view-entity having-condition and no having condition passed to the find method

Modified:
    ofbiz/branches/release11.04/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java

Modified: ofbiz/branches/release11.04/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java?rev=1300757&r1=1300756&r2=1300757&view=diff
==============================================================================
--- ofbiz/branches/release11.04/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java (original)
+++ ofbiz/branches/release11.04/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java Wed Mar 14 22:12:41 2012
@@ -828,7 +828,7 @@ public class GenericDAO {
             if (addParens) havingString.append(")");
         }
         if (UtilValidate.isNotEmpty(viewEntityCondHavingString)) {
-            if (havingString.length() > 0) havingString.append(" AND ");
+            if (UtilValidate.isNotEmpty(entityCondHavingString)) havingString.append(" AND ");
             boolean addParens = viewEntityCondHavingString.charAt(0) != '(';
             if (addParens) havingString.append("(");
             havingString.append(viewEntityCondHavingString);