mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1694 - findList() with firstRows/maxRows adds "order by id" (even with orderById(false))
This commit is contained in:
@@ -50,7 +50,9 @@ public class TestAddOrderByWithFirstRowsMaxRows extends BaseTestCase {
|
||||
List<String> loggedSql = LoggedSqlCollector.stop();
|
||||
|
||||
assertThat(loggedSql).hasSize(1);
|
||||
assertThat(loggedSql.get(0)).contains("order by t0.id");
|
||||
if (isH2()) {
|
||||
assertThat(loggedSql.get(0)).contains("from o_order t0 join o_customer t1 on t1.id = t0.kcustomer_id limit 10");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +111,9 @@ public class TestAddOrderByWithFirstRowsMaxRows extends BaseTestCase {
|
||||
List<String> loggedSql = LoggedSqlCollector.stop();
|
||||
|
||||
assertThat(loggedSql).hasSize(1);
|
||||
assertThat(loggedSql.get(0)).contains("order by t0.id");
|
||||
if (isH2()) {
|
||||
assertThat(loggedSql.get(0)).contains("join o_customer t1 on t1.id = t0.kcustomer_id limit 10");
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -128,7 +132,9 @@ public class TestAddOrderByWithFirstRowsMaxRows extends BaseTestCase {
|
||||
List<String> loggedSql = LoggedSqlCollector.stop();
|
||||
|
||||
assertThat(loggedSql).hasSize(1);
|
||||
assertThat(loggedSql.get(0)).contains("order by t0.id");
|
||||
if (isH2()) {
|
||||
assertThat(loggedSql.get(0)).contains(" limit 10 offset 10");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user