HHH-7705 - Fix Query.setProperties(Map) silently ignores null values provided in the Map
This commit is contained in:
parent
5711c3ce6c
commit
7dec9f83e2
|
@ -900,8 +900,13 @@ public abstract class AbstractQueryImpl implements Query {
|
|||
String namedParam = params[i];
|
||||
final Object object = map.get( namedParam );
|
||||
if ( object == null ) {
|
||||
continue;
|
||||
Type type = parameterMetadata.getNamedParameterDescriptor( namedParam ).getExpectedType();
|
||||
if ( type == null ) {
|
||||
type = StandardBasicTypes.SERIALIZABLE;
|
||||
}
|
||||
setParameter( namedParam, object, type );
|
||||
}
|
||||
else {
|
||||
Class retType = object.getClass();
|
||||
if ( Collection.class.isAssignableFrom( retType ) ) {
|
||||
setParameterList( namedParam, (Collection) object );
|
||||
|
@ -912,8 +917,7 @@ public abstract class AbstractQueryImpl implements Query {
|
|||
else {
|
||||
setParameter( namedParam, object, determineType( namedParam, retType ) );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue