Hi,

As a workaround, why don't you delete each entity in the set in a loop
by yourself before deleting the entity which the set is part of ?

regards

didier

On Jun 6, 1:48 am, mscwd01 <[email protected]> wrote:
> Hey,
>
> I have a "parent" entity which has a Set of "child" entities, as
> follows:
>
> class Parent {
>
> @Persistent @Element(dependent = "true")
> private Set<Child> children;
>
> }
>
> When I delete the "Parent" entity I get the following exception:
>
> javax.jdo.JDOUserException: Cannot read fields from a deleted object
> FailedObject:com.google.appengine.api.datastore.Key:Parent("1000345345456567676")/
> Child(2)
>
> It seems JDO deletes the "Parent" entity before the "Child" objects in
> the dependent Set property, which causes the above exception to appear
> when the Child entities in the Set are themselves deleted. Does anyone
> know how to solve this issue?
>
> FYI when I delete the parent entity I use pm.deletePersistent() within
> a transaction.
>
> Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to