• 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."

  • 相关阅读:
    两层和三层的讨论(C/S)
    FF IE 编码 转换
    MySql数据库 字符编码问题解决办法
    JDO的persistence by reachability
    技术贴
    Eclipse 快捷键总结
    记录一下: 火狐 IE 实现图片本地预览 demo
    一般jsp 翻页 选择 保留 代码
    复习下几个排序
    Eclipse 插件开发 资料贡献
  • 原文地址:https://www.cnblogs.com/drawwindows/p/2178459.html
Copyright © 2020-2023  润新知