From c846f8ea14d6a9b933e961fb1ee2dd70c9a839cb Mon Sep 17 00:00:00 2001 From: Marco Belladelli Date: Thu, 23 Nov 2023 11:38:57 +0100 Subject: [PATCH] HHH-17402 Return correct expressible for generic paths --- .../hibernate/query/sqm/tree/domain/AbstractSqmPath.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmPath.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmPath.java index eaa7a446c5..6a7ca0a765 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmPath.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmPath.java @@ -20,6 +20,7 @@ import org.hibernate.metamodel.model.domain.EntityDomainType; import org.hibernate.metamodel.model.domain.ManagedDomainType; import org.hibernate.metamodel.model.domain.PersistentAttribute; import org.hibernate.query.sqm.NodeBuilder; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.SqmPathSource; import org.hibernate.query.sqm.tree.SqmCopyContext; import org.hibernate.query.sqm.tree.expression.AbstractSqmExpression; @@ -173,6 +174,12 @@ public abstract class AbstractSqmPath extends AbstractSqmExpression implem return getModel(); } + @Override + public SqmExpressible getExpressible() { + //noinspection unchecked + return (SqmExpressible) getResolvedModel(); + } + @Override @SuppressWarnings("unchecked") public SqmExpression> type() {