File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate query help

 
Hanna Habashy
Ranch Hand
Posts: 532
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this query:

select user.userID.userId from User2Element user where user.elementID.elementId in (1, 4, 19, 25, 36)

I am searching by a list of elements IDs
How can I convert this query to dynamic query by passing a list of elements IDs?


I got this error : "unexpected token"



Any help is appreciated,
 
Walter Bernstein
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use "setParameterList()": http://www.hibernate.org/hib_docs/v3/api/org/hibernate/Query.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic