本文介绍了是否有类似Kodo的JDO中的JPA的orphanRemoval之类的方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在,我将Kodo 4.1与JDO一起使用,并且在很多表中看到很多孤儿.我之前在JPA工作过,并且使用orphanRemoval解决了类似的孤立问题,但是我无法在JDO中找到类似的方法.我可以在日志中看到警告,但仅此而已,该警告是针对Kodo Properties的.

Right now I'm using Kodo 4.1 with JDO and I see a lot of orphans in a lot of tables. I worked before with JPA and I solved a similar issue of orphans with orphanRemoval, but I can't fin a method like that in JDO. I can see the warn in my log, but nothing more and the warn is for the Kodo Properties.

推荐答案

JDO具有属性dependent,您可以在字段,集合元素,映射键/值或数组元素上指定该属性.这实际上是级联删除+删除孤儿的方法.

JDO has the attribute dependent that you can specify on a field, or on a collection element, or map key/value, or array element. This is effectively cascade delete + remove orphans.

Kodo 从未完全实施JDO 2.0 IIRC(并且肯定从未获得合规性),因此可能没有实施其中的这一部分.也许它在某个地方做了一些供应商扩展(只是不是标准路线),但是无论哪种方式,这都是一个沉寂的项目.

Kodo never fully implemented JDO 2.0 IIRC (and certainly never obtained compliance), and so maybe didn't implement this part of it. Maybe it had some vendor extension somewhere that does it (just not the standard route), but it is a dead project either way.

DataNucleus JDO 完全实现了JDO 2.0、2.1、2.2、3.0 ,3.1和3.2并兼容,并提供此功能.

DataNucleus JDO fully implements JDO 2.0, 2.1, 2.2, 3.0, 3.1 and 3.2 and is compliant, providing this functionality.

这篇关于是否有类似Kodo的JDO中的JPA的orphanRemoval之类的方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-25 10:12