HHH-18218 Account for generics in dynamic instantiation arguments

This commit is contained in:
Marco Belladelli 2024-06-04 11:24:09 +02:00
parent feaf30e578
commit 0534e1aa01
1 changed files with 6 additions and 2 deletions

View File

@ -143,8 +143,12 @@ public class SqmDynamicInstantiation<T>
private List<Class<?>> argumentTypes() {
return getArguments().stream()
.map(arg -> arg.getNodeJavaType() == null ? Void.class : arg.getNodeJavaType().getJavaTypeClass())
.collect(toList());
.map( arg -> {
final SqmExpressible<?> expressible = arg.getExpressible();
return expressible != null && expressible.getExpressibleJavaType() != null ?
expressible.getExpressibleJavaType().getJavaTypeClass() :
Void.class;
} ).collect( toList() );
}
public boolean isFullyAliased() {