When Hibernate flushes a Session, how does it decide which objects in the session are dirty?

前端 未结 5 1156
渐次进展
渐次进展 2020-12-02 21:11

My understanding of Hibernate is that as objects are loaded from the DB they are added to the Session. At various points, depending on your configuration, the session is flu

5条回答
  •  情深已故
    2020-12-02 21:50

    Hibernate default dirty checking mechanism will traverse current attached entities and match all properties against their initial loading-time values.

    You can better visualize this process in the following diagram:

    Default automatic dirty checking

提交回复
热议问题