mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1841 - SqlServer findCount with @Aggregation gives SQLException:No column name was specified for column 2 of 'c'
This commit is contained in:
@@ -52,6 +52,8 @@ public class TestAggregationTopLevel extends BaseTestCase {
|
||||
if (isH2() || isPostgres()) {
|
||||
assertThat(sql.get(0)).contains("select count(*) from ( select t0.date, sum(t0.total_kms) from d_machine_stats t0 group by t0.date having sum(t0.total_kms) > ?)");
|
||||
assertThat(sql.get(1)).contains("select t0.date, sum(t0.total_kms) from d_machine_stats t0 group by t0.date having sum(t0.total_kms) > ? limit 10");
|
||||
} else if (isSqlServer()) {
|
||||
assertThat(sql.get(0)).contains("select count(*) from ( select t0.date c1, sum(t0.total_kms) c2 from d_machine_stats t0 group by t0.date having sum(t0.total_kms) > ?)");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user