From e0887386873fa51172acc880f00fb64ec605145b Mon Sep 17 00:00:00 2001 From: Marco Belladelli Date: Mon, 5 Dec 2022 12:10:16 +0100 Subject: [PATCH] HHH-15742 Always return inferred mapping for is-null clauses --- .../hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java index d163d97e88..d12ce0fecb 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java @@ -5393,11 +5393,9 @@ public abstract class BaseSqmToSqlAstConverter extends Base return resolveEntityPersister( (EntityDomainType) type ); } } - else if ( parameterJavaType.isEnum() ) { - //inferredMapping is JavaObjectType and we cannot deduct the t - if ( inferredMapping != null ) { - return inferredMapping; - } + else if ( inferredMapping != null ) { + // inferredMapping is JavaObjectType and we cannot deduct the type + return inferredMapping; } } return basicTypeForJavaType;