Hi,
I need to have a one to many owned relationship and be able to reorder
the list.
The list is stored in the data store with new elements at the end
although I add the sub entity first in the ArrayList.

Any suggestions?

This is the result from my test servlet.
deleted all objects
persisted entity: 23
before add MyEntity [keyId=23, myList=[]]
added sub-entity one
after add: MyEntity [keyId=23, myList=[SubEntity [name=one, id=24]]]
query
MyEntity [keyId=23, myList=[SubEntity [name=one, id=24]]]
SubEntity [name=one, id=24]
-------------
before add MyEntity [keyId=23, myList=[SubEntity [name=one, id=24]]]
added sub-entity two
after add: MyEntity [keyId=23, myList=[SubEntity [name=two, id=25],
SubEntity [name=one, id=24]]]
query
MyEntity [keyId=23, myList=[SubEntity [name=one, id=24], SubEntity
[name=two, id=25]]]
SubEntity [name=one, id=24]
SubEntity [name=two, id=25]
-------------
before add MyEntity [keyId=23, myList=[SubEntity [name=two, id=25],
SubEntity [name=one, id=24]]]
added sub-entity three
after add: MyEntity [keyId=23, myList=[SubEntity [name=three, id=26],
SubEntity [name=two, id=25], SubEntity [name=one, id=24]]]
query
MyEntity [keyId=23, myList=[SubEntity [name=one, id=24], SubEntity
[name=two, id=25], SubEntity [name=three, id=26]]]
SubEntity [name=one, id=24]
SubEntity [name=two, id=25]
SubEntity [name=three, id=26]
-------------
before reorder MyEntity [keyId=23, myList=[SubEntity [name=three,
id=26], SubEntity [name=two, id=25], SubEntity [name=one, id=24]]]
reordered object: MyEntity [keyId=23, myList=[SubEntity [name=two,
id=25], SubEntity [name=one, id=24], SubEntity [name=three, id=26]]]
query
MyEntity [keyId=23, myList=[SubEntity [name=one, id=24], SubEntity
[name=two, id=25], SubEntity [name=three, id=26]]]
SubEntity [name=one, id=24]
SubEntity [name=two, id=25]
SubEntity [name=three, id=26]
-------------

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