HHH-10796 - Fix org.hibernate.query.Query<R> setProperties(Map map); set to null parameters not contained in the map

This commit is contained in:
Andrea Boriero 2016-06-03 12:33:38 +01:00 committed by Gail Badner
parent 6027d8319e
commit 35cefeda2f
1 changed files with 3 additions and 1 deletions

View File

@ -763,7 +763,9 @@ public abstract class AbstractProducedQuery<R> implements QueryImplementor<R> {
for ( String paramName : namedParameterNames ) {
final Object object = map.get( paramName );
if ( object == null ) {
setParameter( paramName, null, determineType( paramName, null ) );
if ( map.containsKey( paramName ) ) {
setParameter( paramName, null, determineType( paramName, null ) );
}
}
else {
Class retType = object.getClass();