HHH-17402 Return correct expressible for generic paths

This commit is contained in:
Marco Belladelli 2023-11-23 11:38:57 +01:00 committed by Christian Beikov
parent 5db35dd769
commit c846f8ea14
1 changed files with 7 additions and 0 deletions

View File

@ -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<T> extends AbstractSqmExpression<T> implem
return getModel();
}
@Override
public SqmExpressible<T> getExpressible() {
//noinspection unchecked
return (SqmExpressible<T>) getResolvedModel();
}
@Override
@SuppressWarnings("unchecked")
public SqmExpression<Class<? extends T>> type() {