I have the following Hibernate HQL query:
def query =
"""
select i from Item
where i not in :someItemList
"""
def items = Item.executeQuery(query, [someItemList: someItemList])
In my query someItemList is a list of Item objects. This query works fine if someItemList is not empty. Hibernate raises an exception in case the list is empty.
Is there a way to modify this query that it also works with the empty someItemList?