Skip to content

Commit

Permalink
HHH-17332 Handle anonymous tuples when resolving mapping expressible
Browse files Browse the repository at this point in the history
  • Loading branch information
mbladel committed Oct 23, 2023
1 parent 19b677a commit eaf2155
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
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;
Expand Down Expand Up @@ -786,6 +787,13 @@ public MappingModelExpressible<?> resolveMappingExpressible(
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;
}
Expand Down

0 comments on commit eaf2155

Please sign in to comment.