【发布时间】:2011-10-10 23:04:04
【问题描述】:
我正在使用 JDO 和谷歌应用引擎。我有一个用户类,它有一个区域对象的arrayList。每个 area 对象都有一个 Location 对象的arrayList,它告诉我们坐标。现在我想将一个区域对象从一个用户移动到另一个用户。我正在制作要移动的区域对象的克隆对象,并将其放入其他用户的 areaList 中。然后使用 remove(index) 从第一个用户的列表中删除该区域。但它给出了这个错误:
Detected attempt to establish User("arash") as the parent of User("mh")/RunData(153) but the entity identified by User("mh")/RunData(153) is already a child of User("mh"). A parent cannot be established or changed once an object has been persisted.
其中 arash 和 mh 是用户,我正在将区域从 mh 移动到 arash。
提前致谢。
我该如何解决这个问题。提前致谢。
【问题讨论】:
标签: java google-app-engine persistence parent-child jdo