aspose file tools
The moose likes Object Relational Mapping and the fly likes Hibernate subquery Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "Hibernate subquery" Watch "Hibernate subquery" New topic
Author

Hibernate subquery

Johan den Boer
Greenhorn

Joined: Apr 08, 2008
Posts: 18
Hi

How can I do this query in hibernate using criteria, projections, restrictions

select * from my_table where id = (select id from other_table where name = 'abc')

thanks a lot

Johan


Johan<br /> <br />scjp, scjd
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

The HQL is not that different. What have you tried?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Hibernate subquery
 
Similar Threads
Minus Operation Query
hibernate how to make a count and group by
please help How to Write Sub Query in Hibernate
two table mapping.
Hibernate_listing database values