JPA _only_ supports list-ordering (the good kind). You can use the @OrderBy annotation to specify the properties to order by, but even if you leave this annotation off it will order by the primary key field.
On Mon, Dec 14, 2009 at 8:45 PM, Todd Vierling <[email protected]> wrote: > > On Dec 14, 11:06 pm, "Max Ross (Google)" > <[email protected]<maxr%[email protected]> > > > wrote: > > Ok I've got good news for you. I need to do more testing but I think > > different parent types for child objects should work fine as long as you > use > > list-ordering for your one-to-many relationships, which you really ought > to > > be doing anyway. Position properties are already incredibly inefficient, > > and it turns out the bug you're running into only applies when there are > > position properties in play. You can read more about it in this section: > http://code.google.com/appengine/docs/java/datastore/relationships.ht... > > Ordered Collections Maintain Their Order). > > > > So, if you change your one-to-many relationship on RatePlan to: > > @Persistent > > @Order(extensions = @Extension(vendorName="datanucleus", > > key="list-ordering", value="id")) > > Does this affect JPA modeling as well, and if so, how does the above > map to JPA annotations? (I assume the "value" is the key field, so if > using Key, it should work too?) > > -- > > 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]<google-appengine-java%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > > > -- 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.
