Hibernate 6.0 - OneToOne-Relation: Exception when using empty List in setParameter

Hi,

I just started migrating one of my projects from hibernate 5.6 to 6.0 and I’m struggling with some weird issue.

I have 2 classes, the first one is used as OneToOne relation in the second class.
When querying using an “FROM Xxx WHERE something IN (:list)” providing a empty list as binding, hibernate 6.0 throws "JdbcTypeRecommendationException: Could not determine recommended JdbcType for Xxx". When issuing the same query with hibernate 5.6, an empty result is returned (like I would expect in this case).

Using “null” instead of the empty list, or a list containing any object or null, there is no exception at all. Only when using an empty list the exception will be thrown.

I’m not an expert in using hibernate, so maybe I do something wrong (but I wonder why this was working for hibernate 5.6 and prior).
I created a small unit-test project to demonstrate the issue I have.

Maybe someone could take a look and tell me if I do something wrong or if I triggered some bug.

Thanks

Looks like you ran into a bug. Can you please create a JIRA issue for this?

Ok thanks. I guessed that this behaviour was not indent. I opened HHH-15232 for this.