The difference between Free State and Free State:
When a persistent object, out of hibernation cache management, it is in a free State, free objects and free objects The biggest difference is that the free object in the database may also have a corresponding record, but now this free object out of Hibernate cache management, The free object does not appear in the database with its corresponding data record
(1) Free State (Transient)
Characteristics:
① is not in the session cache and is not associated with any session instances.
② does not have a corresponding record in the database.
(2) Persistent State (persistent)
Characteristics
① is associated with the session instance in the cache of the session.
The ② has a corresponding record in the database.
(3) Free State (Detached)/off-tube status
Characteristics
① is not in the session cache and is not associated with any session instances.
The ② has a corresponding record in the database. (The precondition is that no other session instance deletes the record).
Hibernate entity Object three states: Free State, persistent state, Free State.