Hi guys,
I have a "common" problem to solve: how to order a One-to-Many
Relationships with JDO?

I have parent "Parent", with several children implemented in this
way:
List<Children> childrens

My .jdo file is:
<field persistence-modifier="persistent" name="childrens" mapped-
by="parent"><collection dependent-element="true"></collection><order /
></field>

In this case I see a column in the DB called Parents_INTEGER_IDX, but
to me it seems quite trivial to modify the ordering manually, because
each time I move a children from the last position to the first one I
should modify all the values. I am missing something or it's the only
way?

For this reason and also for this article:
http://code.google.com/appengine/docs/java/datastore/jdo/relationships.html#Owned_One_to_Many_Relationships

.. I am thinking about implementing the order of children with a list
of keys in the Parent.

What do you think?
Michele

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