Author: doogie
Date: Wed Jun 23 21:27:38 2010
New Revision: 957354
URL:
http://svn.apache.org/viewvc?rev=957354&view=revLog:
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(")");
}