From f698c6e2e4668e5e7d13528be525d15933d5deed Mon Sep 17 00:00:00 2001 From: Christian Beikov Date: Thu, 28 Mar 2024 16:42:31 +0100 Subject: [PATCH] HHH-17493 Ensure case insensitivity is retained in negated copy --- .../sqm/tree/predicate/SqmLikePredicate.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmLikePredicate.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmLikePredicate.java index dac3580c79..7f6f38e37d 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmLikePredicate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmLikePredicate.java @@ -143,12 +143,13 @@ public class SqmLikePredicate extends AbstractNegatableSqmPredicate { @Override protected SqmNegatablePredicate createNegatedNode() { - return new SqmLikePredicate( matchExpression, pattern, escapeCharacter, !isNegated(), nodeBuilder() ); - } - - @Override - public SqmNegatablePredicate not() { - negate(); - return this; + return new SqmLikePredicate( + matchExpression, + pattern, + escapeCharacter, + !isNegated(), + isCaseSensitive, + nodeBuilder() + ); } }