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

**URL:** <https://discourse.hibernate.org/t/hibernate-6-0-onetoone-relation-exception-when-using-empty-list-in-setparameter/6271>\
**Category:** Hibernate ORM\
**Created:** [April 26, 2022, 12:30pm UTC](https://discourse.hibernate.org/t/hibernate-6-0-onetoone-relation-exception-when-using-empty-list-in-setparameter/6271 "2022-04-26T12:30:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hypfvieh](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/hypfvieh/32/1865_2.png) [@hypfvieh](https://discourse.hibernate.org/u/hypfvieh)\
**Post date:** [April 26, 2022, 12:30pm UTC](https://discourse.hibernate.org/t/hibernate-6-0-onetoone-relation-exception-when-using-empty-list-in-setparameter/6271/1 "2022-04-26T12:30:49Z")

</div>

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](https://github.com/hypfvieh/hibernate6-onetoone-fail) 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

---

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [April 27, 2022, 10:49am UTC](https://discourse.hibernate.org/t/hibernate-6-0-onetoone-relation-exception-when-using-empty-list-in-setparameter/6271/2 "2022-04-27T10:49:01Z")

</div>

Looks like you ran into a bug. Can you please [create a JIRA issue](https://hibernate.atlassian.net) for this?

---

<div class="post-metadata">

**Author:** ![hypfvieh](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/hypfvieh/32/1865_2.png) [@hypfvieh](https://discourse.hibernate.org/u/hypfvieh)\
**Post date:** [April 27, 2022, 11:47am UTC](https://discourse.hibernate.org/t/hibernate-6-0-onetoone-relation-exception-when-using-empty-list-in-setparameter/6271/3 "2022-04-27T11:47:32Z")

</div>

Ok thanks. I guessed that this behaviour was not indent. I opened [HHH-15232](https://hibernate.atlassian.net/browse/HHH-15232) for this.
