O'Reilly logo

Spring Persistence with Hibernate by Ahmad Seddighi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

All persisting operations in Hibernate are performed through the Session API. In this chapter, we discussed the life cycle of persistent objects inside Hibernate. The states an object goes through with respect to persistence are transient, persistent, detached, and removed. Transient objects are objects that have not been stored yet. Detached objects have already been stored but currently are not associated with a valid session instance. Persistent objects have already been stored and are currently associated with a valid session object. Removed objects are arranged to be removed from the database, but have not yet been removed. These objects are removed as soon as the session's associated transaction is committed. A session object is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required