mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user