GeeCON Prague 2014*
The moose likes Object Relational Mapping and the fly likes Fetching data from the database table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Fetching data from the database table" Watch "Fetching data from the database table" New topic
Author

Fetching data from the database table

Balasubramanian Krishnaswamy
Greenhorn

Joined: Jun 26, 2007
Posts: 24
Hi All,
I am wondering if there is a way in Hibernate where in I can query the database and retrieve data from a table without writing SQL and any type of HQL.
Can someone help me to crack this question? Is Collection concept in Hibernate anything to do with this query?

Thanks
Bala
Leandro Coutinho
Ranch Hand

Joined: Mar 04, 2009
Posts: 417
Balasubramanian Krishnaswamy wrote:Hi All,
I am wondering if there is a way in Hibernate where in I can query the database and retrieve data from a table without writing SQL and any type of HQL.
Can someone help me to crack this question? Is Collection concept in Hibernate anything to do with this query?

Thanks
Bala


yes, there are. this is one of the powers of hibernate. you will use org.hibernate.Session for this, normally using get.

good references:
http://docs.jboss.org/hibernate/stable/core/reference/en/html/
https://www.hibernate.org/hib_docs/v3/api/
 
GeeCON Prague 2014
 
subject: Fetching data from the database table