HHH-15497 Count query when counting polymorphic subclasses by type fails when run twice
This commit is contained in:
parent
7af0642f5b
commit
a9c55587f2
|
@ -51,9 +51,7 @@ public class QueryParameterBindingImpl<T> implements QueryParameterBinding<T>, J
|
|||
protected QueryParameterBindingImpl(
|
||||
QueryParameter<T> queryParameter,
|
||||
SessionFactoryImplementor sessionFactory) {
|
||||
this.queryParameter = queryParameter;
|
||||
this.sessionFactory = sessionFactory;
|
||||
this.bindType = queryParameter.getHibernateType();
|
||||
this( queryParameter, sessionFactory, queryParameter.getHibernateType() );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -204,6 +204,11 @@ public class SqmUtil {
|
|||
|
||||
final Map<SqmParameter<?>, List<List<JdbcParameter>>> jdbcParamMap = jdbcParamXref.get( queryParam );
|
||||
for ( SqmParameter<?> sqmParameter : sqmParameters ) {
|
||||
final MappingModelExpressible resolvedMappingModelType = mappingModelResolutionAccess
|
||||
.getResolvedMappingModelType( sqmParameter );
|
||||
if ( resolvedMappingModelType != null ) {
|
||||
domainParamBinding.setType( resolvedMappingModelType );
|
||||
}
|
||||
final Bindable parameterType = determineParameterType(
|
||||
domainParamBinding,
|
||||
queryParam,
|
||||
|
|
Loading…
Reference in New Issue