Fix NPE for unbound parameters due to wrong type determination

This commit is contained in:
Christian Beikov 2022-01-30 16:09:40 +01:00
parent ce5951a948
commit cd555de724
1 changed files with 1 additions and 6 deletions

View File

@ -221,14 +221,9 @@ public class SqmUtil {
continue;
}
if ( !domainParamBinding.isBound() ) {
final MappingModelExpressible<?> mappingExpressible = SqmMappingModelHelper.resolveMappingModelExpressible(
sqmParameter,
domainModel,
tableGroupLocator
);
for ( int i = 0; i < jdbcParamsBinds.size(); i++ ) {
final List<JdbcParameter> jdbcParams = jdbcParamsBinds.get( i );
mappingExpressible.forEachJdbcType(
parameterType.forEachJdbcType(
(position, jdbcType) -> {
jdbcParameterBindings.addBinding(
jdbcParams.get( position ),