I asked about this a while back and never got a clear answer...  I
just call JDOHelper.makeDirty a lot and things work, but this doesn't
feel like the "right" thing to be doing.

http://groups.google.com/group/google-appengine-java/browse_thread/thread/e81658b708e92d9e



On Aug 2, 6:11 am, Frederik Pfisterer <[email protected]> wrote:
> Hi,
>
> there seems to be something weird with how JDO handles modifications
> (removes) to lists of objects.
> I have two lists:
>
>     @Persistent(defaultFetchGroup = "true")
>     @Element(dependent = "true")
>     private List<Child> dependentObjects = new ArrayList<Child>();
>
>     @Persistent
>     private List<String> stringListProperty = new ArrayList<String>();
>
> Say both lists currently have two persisted entries. While when in
> detached stade i can do this:
>
> myObject.getStringListProperty().remove(0);
>
> Once the object is persisted and retrieved again there is only one
> entry in the list of strings. When i do the same thing with the list
> of children it doesn't persist the changes:
>
> myObject.getDependentObjects().remove(0);
>
> After attaching and persisting myObject there will still be two
> children in the list once it is retrieved at a later point.
>
> I could not find the corresponding JDO datanucleus specification/
> reference, but maybe someone can help and shed some light whether this
> is desired. If needed i can post more code.
>
> Thanks,
> Fred

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