Hibernate Object States – Transient, Persistent and Detached Here we will discuss what is Hibernate object states with examples. Hibernate defines and supports the following object states: Transient Persistent Detached Transient An object is transient if it has just been instantiated using the new operator, and it is not associated with a Hibernate Session. For example, here we are creating a Student object using new operator and note that we are not saving student object to a database using Hibernate Session. Student s1 = newStudent (" Rajan ", "Sharma", "
[email protected]"); Student s2 = newStudent ("Priya", "Madan", "
[email protected]"); It has no persistent representation in the database and no identifier value has been assigned. Transient instances will be destroyed by the garbage collector if the application does not hold a reference anymore.