Hibernate HQL Query : How to set a Collection as a named parameter of a Query?

后端 未结 3 1259
轮回少年
轮回少年 2020-11-30 02:13

Given the following HQL Query:

FROM
    Foo
WHERE
    Id = :id AND
    Bar IN (:barList)

I set :id using the Query object\'s <

3条回答
  •  萌比男神i
    2020-11-30 02:58

    Use Query.setParameterList(), Javadoc here.

    There are four variants to pick from.

提交回复
热议问题