How to write an HQL query, for example, the same SQL query as this:
select * from Users u where u.id in (1, 3, 4)
Try User.find("id in (:ids)").bind("ids", new Long[]{1L,3L,4L}).fetch()
User.find("id in (:ids)").bind("ids", new Long[]{1L,3L,4L}).fetch()
I suggest you use your own query to use your SQL query, so you do not need to convert it to HQL.
The easiest way to do this with a game is
public static void findByIds(List<Long> userIds) { find("from Users u where u.id in (?1)", userIds).fetch(); }