hql find an entity by collection

Solution 1:

try this:

select u from Users u left join u.books b where b in (:booksList)