The GAE JDO  documentation says:
-------------
An owned relationship can be "dependent," meaning that the child
cannot exist without its parent. ... Breaking an owned, dependent
relationship by assigning a new value to the dependent field on the
parent also deletes the old child.

You can declare an owned one-to-one relationship to be dependent by
adding dependent="true" to the Persistent annotation of the field on
the parent object that refers to the child:
// ...
   @Persistent(dependent = "true")
   private ContactInfo contactInfo;
----------------

I'm finding that for one-to-one relationships, contrary to the
documentation above, assigning a new value to the dependent field on
the parent does NOT delete the old child.  If I want it to be deleted,
I have to do it explicitly. (The new child does get persisted as well,
but the old child is not deleted automatically and is the one that's
fetched when the parent is retrieved, unless I specifically delete
it-- then if I do delete it, the new child is fetched).

Has anyone else observed this?  Or perhaps I should ask-- has this
worked as documented for anyone?
My child field is definitely annotated as dependent.

-- 
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