The moose likes Object Relational Mapping and the fly likes comparing two table - hibernate criteria Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "comparing two table - hibernate criteria" Watch "comparing two table - hibernate criteria" New topic

comparing two table - hibernate criteria

debraj mallick
Ranch Hand

Joined: Mar 08, 2011
Posts: 188

hi all,

i have two tables A and B, now i need to compare two tables i.e. (select id form A) - (select id from B)
i can do this with sql query like

but how can i achieve the same with hibernate criteria
any help would be appreciated.

jQuery in Action, 2nd edition
subject: comparing two table - hibernate criteria
Similar Threads
Criteria on joining fails
Criteria with IN clause that comes from a sub sql
Hibernate Performance for CRITERIA / SELECT Queries..
Hibernate subquery
Hibernate:Trying to emunate select * from my_table where ID in ('MOSU0002','MOSU0003') in Hibernate