HHH-16247 Criteria Query with Object-Typed Embedded Parameter throws AssertionError

This commit is contained in:
Andrea Boriero 2023-03-16 11:50:03 +01:00 committed by Christian Beikov
parent 912d2d149b
commit 40b050e386
1 changed files with 4 additions and 0 deletions

View File

@ -31,6 +31,7 @@ import org.hibernate.metamodel.mapping.ForeignKeyDescriptor;
import org.hibernate.metamodel.mapping.JdbcMapping;
import org.hibernate.metamodel.mapping.MappingModelExpressible;
import org.hibernate.metamodel.mapping.PluralAttributeMapping;
import org.hibernate.type.JavaObjectType;
import org.hibernate.type.descriptor.converter.spi.BasicValueConverter;
import org.hibernate.query.IllegalQueryOperationException;
import org.hibernate.query.IllegalSelectQueryException;
@ -385,6 +386,9 @@ public class SqmUtil {
parameterType = association.getForeignKeyDescriptor();
}
}
else if ( parameterType instanceof JavaObjectType ) {
parameterType = domainParamBinding.getType();
}
int offset = jdbcParameterBindings.registerParametersForEachJdbcValue(
bindValue,