From 059a63e9baed8122db2ffc023d34310c245ae79d Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Wed, 13 Jul 2022 11:35:05 +0200 Subject: [PATCH] HHH-15395 HibernateCriteriaBuider#power(Expression x, Number y) throws ClassCastException --- .../hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java index 31c9c519f8..a5b027d3be 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java @@ -753,7 +753,7 @@ public class SqmCriteriaNodeBuilder implements NodeBuilder, SqmCreationContext, @Override public JpaExpression power(Expression x, Number y) { return getFunctionDescriptor( "power" ).generateSqmExpression( - Arrays.asList( (SqmExpression) x, (SqmExpression) y), + Arrays.asList( (SqmExpression) x, value( y ) ), null, queryEngine, getJpaMetamodel().getTypeConfiguration()