Skip to content

Commit 15e8e3b

Browse files
committed
Use 'lower' for all ignoreCase operations.
To avoid having to maintain multiples indices, use 'lower' for all ignoreCase operations (JSqlParser, QueryByExample, Querydsl). See #2420.
1 parent 6b27459 commit 15e8e3b

File tree

1 file changed

+2
-2
lines changed
  • spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query

1 file changed

+2
-2
lines changed

spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,8 @@ private static jakarta.persistence.criteria.Order toJpaOrder(Order order, From<?
610610
Expression<?> expression = toExpressionRecursively(from, property);
611611

612612
if (order.isIgnoreCase() && String.class.equals(expression.getJavaType())) {
613-
Expression<String> lower = cb.lower((Expression<String>) expression);
614-
return order.isAscending() ? cb.asc(lower) : cb.desc(lower);
613+
Expression<String> upper = cb.lower((Expression<String>) expression);
614+
return order.isAscending() ? cb.asc(upper) : cb.desc(upper);
615615
} else {
616616
return order.isAscending() ? cb.asc(expression) : cb.desc(expression);
617617
}

0 commit comments

Comments
 (0)