mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#2392 - Oracle specific singleAttribute distinct query - not include the column twice with order by clause
This commit is contained in:
@@ -583,7 +583,7 @@ final class CQueryBuilder {
|
||||
final OrderBy<?> orderBy = query.getOrderBy();
|
||||
if (orderBy != null && orderBy.supportsSelect()) {
|
||||
String trimmed = DbOrderByTrim.trim(dbOrderBy);
|
||||
if (query.isSingleAttribute() && trimmed.equals(select.getSelectSql())) {
|
||||
if (query.isSingleAttribute() && select.getSelectSql().startsWith(trimmed)) {
|
||||
// NOP, already in SQL
|
||||
// TODO: what to do if we select("id").orderBy("prop,id")?
|
||||
// Can we live with a query like "select t0.id, t0.prop, t0.id from"
|
||||
|
||||
Reference in New Issue
Block a user