#1331 - ENH: Support Aggregation formula with findSingleAttribute() ... max, min, avg, count and count(distinct ..)

This commit is contained in:
Rob Bygrave
2018-03-06 12:58:43 +13:00
parent ec2c3b13d4
commit 3ca4efc818
23 changed files with 783 additions and 51 deletions
@@ -418,7 +418,7 @@ public final class SqlTreeBuilder {
// make sure we only included the base/embedded bean once
if (!selectProps.containsProperty(baseName)) {
BeanProperty p = desc.findBeanProperty(baseName);
SqlTreeProperty p = desc.findSqlTreeProperty(baseName);
if (p == null) {
logger.error("property [" + propName + "] not found on " + desc + " for query - excluding it.");
@@ -436,7 +436,7 @@ public final class SqlTreeBuilder {
} else {
// find the property including searching the
// sub class hierarchy if required
BeanProperty p = desc.findBeanProperty(propName);
SqlTreeProperty p = desc.findSqlTreeProperty(propName);
if (p == null) {
logger.error("property [" + propName + "] not found on " + desc + " for query - excluding it.");
p = desc.findBeanProperty("id");