Skip to content

Commit b7d2fd1

Browse files
dreab8marko-bekhta
authored andcommitted
HHH-19926 NullPointerException when executing JPQL IN clause with null parameter on entity association
1 parent 1c6e250 commit b7d2fd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hibernate-core/src/main/java/org/hibernate/query/spi/AbstractCommonQueryContract.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ public CommonQueryContract setParameter(String name, Object value) {
824824
final QueryParameter<Object> param = binding.getQueryParameter();
825825
if ( param.allowsMultiValuedBinding() ) {
826826
final BindableType<?> hibernateType = param.getHibernateType();
827-
if ( hibernateType == null || isInstance( hibernateType, value ) ) {
827+
if ( hibernateType == null || value == null || isInstance( hibernateType, value ) ) {
828828
if ( value instanceof Collection && !isRegisteredAsBasicType( value.getClass() ) ) {
829829
//noinspection rawtypes
830830
return setParameterList( name, (Collection) value );

0 commit comments

Comments
 (0)