Meaningless Drivel is fun!*
The moose likes Object Relational Mapping and the fly likes [Hibernate criteria api] is it possible to fetch data from two tables? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "[Hibernate criteria api] is it possible to fetch data from two tables?" Watch "[Hibernate criteria api] is it possible to fetch data from two tables?" New topic
Author

[Hibernate criteria api] is it possible to fetch data from two tables?

Saurabh Pillai
Ranch Hand

Joined: Sep 12, 2008
Posts: 506
Thank you.
Sean Clark
Rancher

Joined: Jul 15, 2009
Posts: 377

Yes.

You can use Associations and Projections to achieve this, see: hibernate criteria.

Sean


I love this place!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: [Hibernate criteria api] is it possible to fetch data from two tables?