Back to Developer Roadmap

Entity lifecycle

src/data/roadmaps/spring-boot/content/[email protected]

4.0595 B
Original Source

Entity lifecycle

In Hibernate, we can either create a new object of an entity and store it into the database, or we can fetch the existing data of an entity from the database. These entity is connected with the lifecycle and each object of entity passes through the various stages of the lifecycle.

There are mainly four states of the Hibernate Lifecycle :

  • Transient State
  • Persistent State
  • Detached State
  • Removed State

Visit the following resources to learn more: