svn commit: r1300747 - /ofbiz/trunk/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: r1300747 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java

jonesde
Author: jonesde
Date: Wed Mar 14 21:58:37 2012
New Revision: 1300747

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

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java?rev=1300747&r1=1300746&r2=1300747&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java Wed Mar 14 21:58:37 2012
@@ -874,7 +874,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);