• Post Reply Bookmark Topic Watch Topic
  • New Topic

JPQL query with IN Operator

 
paddy Mahadeva Iyer
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Consider my JPQL query

and that "field1" is of type integer.

Now to my problem. Lets say i want to test for two numbers while executing this query first time "eg: 1,2" and the second time with three numbers "eg:1,2,3". How do i do this?

I mean when i try to pass a string a parameter "1,2,3" it is not accepting neither a integer array. So is there anyway to reuse the same query for multiple set of parameters?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!