Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Equivalent of SQL "in"

 
Dushy Inguva
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have to locate all documents in the database for a Set of owners. Each document is defined to have a many-to-one mapping to an Owner object. Now, can I specify the owner set in the query param ?

[ June 27, 2005: Message edited by: Dushy Inguva ]
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you asking what the HQL equivalent of the SQL IN operator is? If so the answer is they are the same in both query languages, and behave in the same way. If you have an array of owner ids you can just bind that to your named parameter and there you go.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic