谷歌表示JDO不会从Datastore进行级联删除。你是怎么做到的? [英] Google says JDO doesn't do cascading deletes from Datastore. So how do you do it?

查看:111
本文介绍了谷歌表示JDO不会从Datastore进行级联删除。你是怎么做到的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google表示:
$ b


注意:JDO实现会删除相关的子对象,而不是数据存储。如果您使用低级API或管理控制台删除父实体,则相关子对象不会被删除。


所以我该如何删除一个实体,它的子实体是ArrayList ???

不应该这是一个基本特性 - 从父实体中删除依赖子实体?

解决方案

它并不是说JDO不会执行级联依赖子级。事实上,它的确在做它们,但它是JDO中的代码。因此,如果您直接触摸数据库(SQL或管理工具),则依赖的子项不会被删除。


Google says:

Note: The JDO implementation does the work to delete dependent child objects, not the datastore. If you delete a parent entity using the low-level API or the Admin Console, the related child objects will not be deleted.

So how DO I delete an Entity which has child entities that are ArrayList ???

Shouldn't this be a basic feature - to delete the dependent child entities from a parent Entity?

解决方案

Its not saying that JDO doesn't do cascading dependent children. In fact, it's saying that it does indeed do them, but it's the code in the JDO that does such. As such, if you touch the database directly (SQL or admin tool), the dependant children won't be deleted.

这篇关于谷歌表示JDO不会从Datastore进行级联删除。你是怎么做到的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆