mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
No effective change - add test for selecting only some @Aggregation properties
This commit is contained in:
@@ -111,6 +111,18 @@ public class TestAggregationCount extends BaseTestCase {
|
||||
assertThat(sql).contains(" order by sum(u1.units), t0.name");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSelectSome() {
|
||||
|
||||
Query<TEventOne> query0 = Ebean.find(TEventOne.class)
|
||||
.select("name, count, totalUnits");
|
||||
|
||||
query0.findList();
|
||||
String sql = sqlOf(query0, 5);
|
||||
assertThat(sql).contains("select t0.id, t0.name, count(u1.id), sum(u1.units) from tevent_one t0");
|
||||
assertThat(sql).contains("group by t0.id, t0.name");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSelectOnly() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user