Passing empty collection to query using "IN" gives SQL syntax error

Description

Using a query like "FROM BEntity b WHERE b.a IN :coll" gives this error:

could not prepare statement; SQL [select bentity0_.id as id1_1_, bentity0_.desc as desc2_1_ from bentity bentity0_ where bentity0_.id in ()]; nested exception is org.hibernate.exception.SQLGrammarException: could not prepare statement

I expect an empty set as result instead

Environment

Spring Boot 2.2

Assignee

Unassigned

Reporter

Alessandro Polverini

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure