Hi,
I am working on a simple structure similar to:
class Parent {
...
List<Child> children
..
}
class Child {
..
Parent parent
..
}
mapped with a 1-N relation in JDO:
<field persistence-modifier="persistent" name="children" mapped-
by="parent">
<collection dependent-element="true" element-type="Child"></
collection>
<order/>
</field>
with a simple index:
<datastore-index kind="Child" ancestor="true" source="manual">
<property name="children_INTEGER_IDX" direction="desc"/>
</datastore-index>
.. and I always retrieve Children in descending order.
But when I add a children I get this error:
com.google.appengine.api.datastore.DatastoreNeedIndexException: no
matching index found.
The suggested index for this query is:
<datastore-index kind="Child" ancestor="true" source="manual">
<property name="children_INTEGER_IDX" direction="asc"/>
</datastore-index>
So my question is: why do I always need both indexes for ascending and
descending order if I need only type of ordering?
Thanks,
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.