现在我正在使用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属性,您可以在字段上,集合元素上,或映射键/值或数组元素上指定。 这实际上是级联删除+删除孤儿。
Kodo从未完全实施JDO 2.0 IIRC(当然也从未获得合规性),因此可能没有实现这一部分。 也许它在某个地方有一些供应商扩展(只是不是标准路线),但它无论如何都是一个死的项目。
DataNucleus JDO完全实现了JDO 2.0,2.1,2.2,3.0,3.1和3.2,并且兼容,提供此功能。
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 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 fully implements JDO 2.0, 2.1, 2.2, 3.0, 3.1 and 3.2 and is compliant, providing this functionality.
更多推荐
发布评论