You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2010/06/23 23:27:38 UTC

svn commit: r957354 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java

Author: doogie
Date: Wed Jun 23 21:27:38 2010
New Revision: 957354

URL: http://svn.apache.org/viewvc?rev=957354&view=rev
Log:
Another fix for OFBIZ-3789, reported by rohit.  COUNT(groupByViewField)
didn't work correctly.

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=957354&r1=957353&r2=957354&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 Jun 23 21:27:38 2010
@@ -1002,7 +1002,7 @@ public class GenericDAO {
                 } else {
                     sqlBuffer.append("COUNT(DISTINCT ");
                     // this only seems to support a single column, which is not desirable but seems a lot better than no columns or in certain cases all columns
-                    sqlBuffer.append(firstSelectField.getColName());
+                    sqlBuffer.append(firstSelectField.getColValue());
                     // sqlBuffer.append(modelEntity.colNameString(selectFields, ", ", "", datasourceInfo.aliasViews));
                     sqlBuffer.append(")");
                 }