HHH-10796 - Fix org.hibernate.query.Query<R> setProperties(Map map); set to null parameters not contained in the map
(cherry picked from commit35cefeda2f
) Conflicts: hibernate-core/src/main/java/org/hibernate/query/internal/AbstractProducedQuery.java (cherry picked from commitdc32226aab
)
This commit is contained in:
parent
5be28c85a0
commit
358bed04ac
|
@ -900,11 +900,13 @@ public abstract class AbstractQueryImpl implements Query {
|
|||
String namedParam = params[i];
|
||||
final Object object = map.get( namedParam );
|
||||
if ( object == null ) {
|
||||
Type type = parameterMetadata.getNamedParameterDescriptor( namedParam ).getExpectedType();
|
||||
if ( type == null ) {
|
||||
type = StandardBasicTypes.SERIALIZABLE;
|
||||
if ( map.containsKey( namedParam ) ) {
|
||||
Type type = parameterMetadata.getNamedParameterDescriptor( namedParam ).getExpectedType();
|
||||
if ( type == null ) {
|
||||
type = StandardBasicTypes.SERIALIZABLE;
|
||||
}
|
||||
setParameter( namedParam, null, type );
|
||||
}
|
||||
setParameter( namedParam, object, type );
|
||||
}
|
||||
else {
|
||||
Class retType = object.getClass();
|
||||
|
|
Loading…
Reference in New Issue