Java – what is a hibernate dirty session?

I wonder if anyone can tell me what a hibernate dirty session is? I seem to have a problem with standard queries when inserts should not be performed I believe it has something to do with a dirty conversation, but I can't solve my problem without knowing what the real conversation is In addition, how to create a dirty session thank you.

Solution

Hibernate sessions are caches It caches entities read from the database and also caches changes made to included entities and added and deleted entities until the session is refreshed (that is, all pending changes are written to the database)

When some changes have not been refreshed, the session appears dirty Therefore, it is normal to have a dirty session The session was refreshed before the transaction was committed

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>