collection as named parameter in the named query

4 views
Skip to first unread message

Enrico Giurin

unread,
Mar 30, 2010, 5:31:12 AM3/30/10
to lambico-users
As lambico user I want to have the possibility to create a named query
passing a collection as parameter, i.e.,
in the User PO:


@NamedQuery(name = "User.nameInGroup", query = "from User u where
u.name in (:names) ")}

The Dao, corresponding to the User PO, UserDao should contain a method
like this:

List<User> nameInGroup(@NamedParameter("names") List<String> names);

Reply all
Reply to author
Forward
0 new messages