mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-17 22:56:28 +00:00
#1269 - Paging queries should not ALWAYS append an order by ID ... but only when the order by is empty
This commit is contained in:
1 parent
ec7b376612
commit
8ee68ac5e1
8 files changed
+38
-24
No files matched your search
@@ -1372,6 +1372,15 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPagingOrderBy() {
|
||||
return (maxRows > 1 || firstRow > 0) && !distinct && orderByIsEmpty();
|
||||
}
|
||||
|
||||
private boolean orderByIsEmpty() {
|
||||
return orderBy == null || orderBy.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderBy<T> getOrderBy() {
|
||||
return orderBy;
|
||||
|
||||
Reference in new issue
Block a user