Fix countNodes() for grouped collections.
This commit is contained in:
parent
67b705117a
commit
b89989fa20
1 changed files with 5 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue