zoukankan      html  css  js  c++  java
  • JDO的persistence by reachability

    So what does it mean "persistence by reachability"? The JDO specification defines it the following way:
    "When a persistent instance is committed to the data store, instances referenced by persistent fields of the flushed instance become persistent. This behavior propagates to all instances in the closure of instances through persistent fields. This behavior is called persistence by reachability."
    And the following quote regarding makePersistent and makePersistentAll methods:
    "These methods make a transient instance persistent directly. They must be called in the context of an active transaction, or a JDOUserException is thrown. They will assign an object identity to the instance and transition it to persistent-new. Any transient instances reachable from this instance via persistent fields of this instance will become provisionally persistent, transitively. That is, they behave as persistent-new instances (return true to isPersistent, isNew, and isDirty). But at commit time, the reachability algorithm is run again, and instances made provisionally persistent that are not currently reachable from persistent instances will revert to transient."

  • 相关阅读:
    teamviewer被识别为商用的解决办法
    PLY调试笔记——待解决的问题
    python中的反射
    类的继承顺序
    面向对象---继承
    类成名和命名空间
    面向对象编程
    模块的初始
    装饰器
    列表推导式,生成器
  • 原文地址:https://www.cnblogs.com/drawwindows/p/2178459.html
Copyright © 2011-2022 走看看