File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Murach's Java Servlets and JSP this week in the Servlets 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/
 
Don't get me started about those stupid light bulbs.
 
subject: Fetching data from the database table
 
Similar Threads
Update Query in Hibernate (Please Help)
Hibernate should hit db every single time
How data stored in Database
Query Result Caching
Use of Hibernate