If I pass an empty list into a JPA query, I get an error. For example:
List municipalities = myDao.findAll(); // returns empty list
em.c
I struggled with this issue, too. I found out that the Hibernate community has RESOLVED the issue in Hibernate version 5.4.10, here is the ticket: https://hibernate.atlassian.net/browse/HHH-8091
You can check your Hibernate version System.out.println(org.hibernate.Version.getVersionString());
And you can UPDATE the version of Hibernate to the latest, here is a useful link: https://bintray.com/hibernate/artifacts/hibernate-orm#