Entity Lifecycle
  • Entities go through the following lifecycle:
Persistent State Description
New The entity has no persistent identity, and is not yet associated with a persistence context
Managed The entity is an instance with a persistent identity that is currently associated with a persistence context
Detached The entity is an instance with a persistent identity that is not (or no longer) associated with a persistence context
Removed The entity is an instance with a persistent identity, associated with a persistence context, that is scheduled for removal from the database