On three data states in Hibernate (temporary, persistent and free)
1. Temporary state (transient state)
Data that does not exist in a session or in a database is called temporal.
For example, the object just created with the new keyword.
2. Persistent state
The data that exists in a session and the transaction has not been committed and will eventually enter the database after committing is called persistent state.
For example: just used session The object of the save() operation.
3. Free state (off tube state)
Data that exists in the database but does not exist in the session is called free state.
For example: using session After save() and the transaction has been committed, the object enters the database and becomes free.
The above discussion on the three data states (temporary, persistent and free) in Hibernate is all the content shared by Xiaobian. I hope it can give you a reference and support more programming tips.