#1737 - PersistenceException while using aggregate query on related entity

This part includes support for joins off an aggregation formula
on a ManyToOne.

e.g. We use min(customer) ... to 'query join' to customer
in the query below.

    List<Contact> contacts = Ebean.find(Contact.class)
      .select("lastName, min(customer)")
      .fetchQuery("customer", "name, status")
      .findList();
This commit is contained in:
rob bygrave
2019-06-28 21:03:14 +12:00
parent 24b08663af
commit a932d61a94
7 changed files with 122 additions and 72 deletions
@@ -11,6 +11,11 @@ public class DynamicPropertyAggregationFormulaMTO extends DynamicPropertyAggrega
this.prop = prop;
}
@Override
public boolean isAggregationManyToOne() {
return true;
}
@Override
public void load(SqlBeanLoad sqlBeanLoad) {
Object value;