Skip to content

Conversation

@gavinking
Copy link
Member

@gavinking gavinking commented Nov 13, 2025

[Please describe here what your change is about]


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


https://hibernate.atlassian.net/browse/HHH-19926

@gavinking gavinking marked this pull request as ready for review November 13, 2025 12:41
@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Nov 13, 2025

Thanks for your pull request!

This pull request does not follow the contribution rules. Could you have a look?

❌ All commit messages should start with a JIRA issue key matching pattern HHH-\d+
    ↳ Offending commits: [53f4a73]

› This message was automatically generated.

@dreab8
Copy link
Member

dreab8 commented Nov 13, 2025

Hi @gavinking ,

I gave a quick look and this

assertEquals( 0,
		session.createQuery( "select e from EntityWithOneToOne e where e.other in (:list)" )
			.setParameter( "list", null )
			.list().size() );

where a e.other is an association fails with

java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "value" is null

	at org.hibernate.type.descriptor.java.spi.EntityJavaType.isInstance(EntityJavaType.java:53)
	at org.hibernate.query.spi.AbstractCommonQueryContract.isInstance(AbstractCommonQueryContract.java:839)
	at org.hibernate.query.spi.AbstractCommonQueryContract.multipleBinding(AbstractCommonQueryContract.java:821)
	at org.hibernate.query.spi.AbstractCommonQueryContract.setParameter(AbstractCommonQueryContract.java:805)
	at org.hibernate.query.spi.AbstractSelectionQuery.setParameter(AbstractSelectionQuery.java:639)
	at org.hibernate.query.sqm.internal.SqmQueryImpl.setParameter(SqmQueryImpl.java:1049)
	at org.hibernate.query.sqm.internal.SqmQueryImpl.setParameter(SqmQueryImpl.java:109)
	at org.hibernate.orm.test.query.hql.FunctionTests.lambda$testIn$0(FunctionTests.java:2513)

If it's ok for you I can give a look into it?

@gavinking
Copy link
Member Author

If it's ok for you I can give a look into it?

OK, yes please!

@gavinking gavinking marked this pull request as draft November 13, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants