Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Fetching data from the database table

 
Balasubramanian Krishnaswamy
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 423
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic