*
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Fetching data from the database table
 
Similar Threads
Use of Hibernate
Query Result Caching
Hibernate should hit db every single time
Update Query in Hibernate (Please Help)
How data stored in Database