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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

jonesde
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);