HHH-17332 Handle anonymous tuples when resolving mapping expressible

This commit is contained in:
Marco Belladelli 2023-10-20 15:26:53 +02:00
parent 2b8947ecd0
commit 40a5c0059e
1 changed files with 8 additions and 0 deletions

View File

@ -62,6 +62,7 @@ import org.hibernate.persister.entity.EntityPersister;
import org.hibernate.persister.entity.Queryable;
import org.hibernate.persister.spi.PersisterFactory;
import org.hibernate.query.BindableType;
import org.hibernate.query.derived.AnonymousTupleSqmPathSource;
import org.hibernate.query.sqm.SqmExpressible;
import org.hibernate.query.sqm.tree.domain.SqmPath;
import org.hibernate.query.sqm.tree.expression.SqmFieldLiteral;
@ -790,6 +791,13 @@ public class MappingMetamodelImpl extends QueryParameterBindingTypeResolverImpl
throw new UnsupportedOperationException( "Resolution of embedded-valued SqmExpressible nodes not yet implemented" );
}
if ( sqmExpressible instanceof AnonymousTupleSqmPathSource<?> ) {
return resolveMappingExpressible(
( (AnonymousTupleSqmPathSource<?>) sqmExpressible ).getSqmPathType(),
tableGroupLocator
);
}
if ( sqmExpressible instanceof EmbeddableTypeImpl ) {
return (MappingModelExpressible<?>) sqmExpressible;
}