I just learned Hibernate for a while, but after learning about Java serialization, I learned that Hibernate's persistence is serialized into memory, and the last time the data is taken out is deserialization. But I have a question, Hibernate's get and other queries Is it stored in memory through serialization? ? But why does Hibernate's Load method take it out from the session first? ? I am very curious about whether the Hibernate data is persisted in the memory or in the session after it is queried? If it is stored in memory, why is the load method taken out from the session? If it is stored in the session, why is persistence said to be serialized and stored in memory? I have just come into contact with Hibernate for a while. Please give me some advice. Thank you very much! ! !
session就是hibernate划分的一块内存区域啊,为了减少数据库访问压力而设置的缓存区域,问题中说的hibernate的持久化是通过对(是指对象吗)序列化到内存这点没懂,持久化的过程应该是数据从内存这个非持久化区域写入磁盘(数据库)的过程,更多hibernate的细节记不清了,建议你找本书看看这几个概念吧;