Use 'lower' for all ignoreCase operations.
To avoid having to maintain multiples indices, use 'lower' for all ignoreCase operations (JSqlParser, QueryByExample, Querydsl). See #2420.
This commit is contained in:
@@ -610,8 +610,8 @@ public abstract class QueryUtils {
|
||||
Expression<?> expression = toExpressionRecursively(from, property);
|
||||
|
||||
if (order.isIgnoreCase() && String.class.equals(expression.getJavaType())) {
|
||||
Expression<String> lower = cb.lower((Expression<String>) expression);
|
||||
return order.isAscending() ? cb.asc(lower) : cb.desc(lower);
|
||||
Expression<String> upper = cb.lower((Expression<String>) expression);
|
||||
return order.isAscending() ? cb.asc(upper) : cb.desc(upper);
|
||||
} else {
|
||||
return order.isAscending() ? cb.asc(expression) : cb.desc(expression);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user