This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate: how to look for objects in a Set  RSS feed

 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to figure out what is the best way to write the HQL statement for the following scenario:

I have a class Book which has a property of the type Set<Author>. The class Author has properties such as name, etc.

Now my DAO method gets "Set<Author> authors" as a parameter. For this method I want to write an HQL query so I could get all the Books that at least one of their Authors is found in authors.

What is the best way to accomplish this?

Thanks!
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!