Hello!

I'm using Google App Engine Datastore with JDO. According to
documentation, in owned one-to-many relationships, order of elements
in "owner" object collection is determined either by automatically
created index field, or by information given in explicit ordering
clause. For example:

    @PersistenceCapable
    public class Person {
        // ...
        @Order(extensions = @Extension(vendorName="datanucleus",
key="list-ordering", value="country asc, city asc"))
        private List<ContactInfo> contacts = new List<ContactInfo>();


In unowned relationships, "owner" object contains collection of keys
of "nested" objects, for example:

    @PersistenceCapable
    public class Author {
        // ...
        @Persistent
        private List<Key> books;


The question is, is order of keys preserved, if List<Key> collection
is used for storing keys of "dependent" elements?
Generally, is order is preserved for persistent List fields?

Unfortunately, I could not find answer neither in JDO relationships
article (http://code.google.com/appengine/docs/java/datastore/jdo/
relationships.html), nor in Data Classes article (http://
code.google.com/appengine/docs/java/datastore/jdo/dataclasses.html).

Also, I found several contradicting answers in different discussion
threads in Google AppEngine group:
    - 
http://groups.google.com/group/google-appengine-java/browse_thread/thread/3c929893fee56083/3c621cb19273f9cd?lnk=gst&q=order
    - 
http://groups.google.com/group/google-appengine-java/browse_thread/thread/1ad8bc86ccc5d2ec/e94bdeaff1523b7c?lnk=gst&q=order
    - 
http://groups.google.com/group/google-appengine-java/browse_thread/thread/4580ede10e04f1c0/5c611cf1c09db51f?lnk=gst&q=order

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