Proper way of writing a HQL in ( … ) query

I am unsure how to do this with positional parameter, but if you can use named parameters instead of positional, then named parameter can be placed inside brackets and setParameterList method from Query interface can be used to bind the list of values to this parameter.

...
Query query = session.createQuery("FROM Cat c WHERE c.id IN (:ids)");
query.setParameterList("ids", listOfIds);
...

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)