adspace


Explain the types of hibernate instance states.

Answer Posted / Ekta

Hibernate Instance States are used to track the lifecycle of an object during its interaction with the database. There are three main states:n
1. Transient State: The object is not associated with any Session and has no persistent identity. It exists only in Java memory.n
2. Persistent State: The object is associated with a Hibernate Session, but it's not yet stored in the database. Modifications made to this state will be synchronized with the database when the Session is flushed or closed.n
3. Detached State: The object was originally persistent and associated with a Hibernate Session, but now it's no longer associated with any session. It exists only in Java memory and is not synchronized with the database unless re-associated with a Session.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is latest hibernate version?

493