JDO in Google App Engine: order of keys in unowned one-to-many relationship
- by Kel
I'm implementing web application with JDO in Google App Engine.
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;
Is order of keys preserved, if I use List<Key> collection in "owner" object for storing keys of "nested" elements?
I could not find answer neither in JDO relationships article, nor in Data Classes article :(