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;