Fix countNodes() for grouped collections.

This commit is contained in:
hns 2009-09-14 19:56:51 +00:00
parent 67b705117a
commit b89989fa20

View file

@ -20,7 +20,6 @@ import helma.framework.core.Application;
import helma.objectmodel.INode;
import helma.objectmodel.IProperty;
import helma.util.StringUtils;
import helma.util.ResourceProperties;
import java.sql.SQLException;
import java.util.HashMap;
@ -982,6 +981,11 @@ public final class Relation {
}
}
}
if (isCount && groupby != null) {
q.insert(0, "SELECT count(*) FROM (");
q.append(") as NESTED_COUNT_QUERY");
}
}
protected void appendAdditionalTables(StringBuffer q) {