mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
No effective change - update test to use trimmed sql (trim out sql column alias to allow it to be optional)
This commit is contained in:
@@ -79,8 +79,8 @@ public class TestAggregationCount extends BaseTestCase {
|
||||
|
||||
assertThat(list).isNotEmpty();
|
||||
|
||||
String sql = query2.getGeneratedSql();
|
||||
assertThat(sql).contains("select t0.id c0, t0.name c1, count(u1.id) c2, sum(u1.units) c3, sum(u1.units * u1.amount) c4 from tevent_one t0");
|
||||
String sql = sqlOf(query2, 5);
|
||||
assertThat(sql).contains("select t0.id, t0.name, count(u1.id), sum(u1.units), sum(u1.units * u1.amount) from tevent_one t0");
|
||||
assertThat(sql).contains("from tevent_one t0 join tevent_many u1 on u1.event_id = t0.id ");
|
||||
assertThat(sql).contains("where u1.description like ? ");
|
||||
assertThat(sql).contains(" group by t0.id, t0.name having count(u1.id) >= ? order by t0.name");
|
||||
@@ -97,8 +97,9 @@ public class TestAggregationCount extends BaseTestCase {
|
||||
.select("name, count, totalUnits, totalAmount");
|
||||
|
||||
query0.findList();
|
||||
assertThat(query0.getGeneratedSql()).contains("select t0.id c0, t0.name c1, count(u1.id) c2, sum(u1.units) c3, sum(u1.units * u1.amount) c4 from tevent_one t0");
|
||||
assertThat(query0.getGeneratedSql()).contains("group by t0.id, t0.name");
|
||||
String sql = sqlOf(query0, 5);
|
||||
assertThat(sql).contains("select t0.id, t0.name, count(u1.id), sum(u1.units), sum(u1.units * u1.amount) from tevent_one t0");
|
||||
assertThat(sql).contains("group by t0.id, t0.name");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -109,8 +110,9 @@ public class TestAggregationCount extends BaseTestCase {
|
||||
.where().gt("logs.description", "a").query();
|
||||
|
||||
query0.findList();
|
||||
assertThat(query0.getGeneratedSql()).contains("select t0.id c0, t0.name c1, count(u1.id) c2, sum(u1.units) c3, sum(u1.units * u1.amount) c4 from tevent_one t0");
|
||||
assertThat(query0.getGeneratedSql()).contains("group by t0.id, t0.name");
|
||||
String sql = sqlOf(query0, 5);
|
||||
assertThat(sql).contains("select t0.id, t0.name, count(u1.id), sum(u1.units), sum(u1.units * u1.amount) from tevent_one t0");
|
||||
assertThat(sql).contains("group by t0.id, t0.name");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user