Explain the role of session interface in hibernate.
Answer / Uzma Naz
The Session interface plays a crucial role in Hibernate as it acts as a bridge between Java objects and the database. It provides methods to persist, update, delete, and query Java objects. The main responsibilities of the Session interface include:
1. Persisting new objects into the database.
2. Updating existing objects in the database.
3. Deleting objects from the database.
4. Querying the database using Hibernate Query Language (HQL) or Criteria API.
5. Managing transactions and connection pools.
| Is This Answer Correct ? | 0 Yes | 0 No |
In which condition is one to many relationship used?
What are the key components of a hibernate configuration object?
How mapping of java objects is done with database tables?
What is the difference between persist and save in hibernate?
What is ehcache in hibernate?
What is the use of hibernateutil?
What is detached in hibernate?
Does hibernate use jdbc internally?
How primary key is created by using hibernate?
What are the three orm levels?
What are the core interfaces are of hibernate framework?
What are native queries?