Hi, Can you execute the query in the development? I think that [datastore-indexes-auto.xml] is made when you execute query with development.
You might straighten out that problem by comparing datastore-indexes-auto.xml and datastore-indexes.xml. Or, please confirm the status of INDEX. It exists in [Datastore Indexes] of the admin console. Please try thanks. 2010/3/11 thierry Le conniat <[email protected]>: > Hello, > I Got a problem when quering data with the key <fileName> . The error > is below : > > com.google.appengine.api.datastore.DatastoreNeedIndexException: no > matching index found.. > <datastore-index kind="Picture" ancestor="false" source="manual"> > <property name="__key__" direction="desc"/> > </datastore-index> > > The index is not found, but i have declared it in the file <datastore- > indexes.xml> like this : > > <?xml version="1.0" encoding="UTF-8"?> > <datastore-indexes autoGenerate="true"> > <datastore-index kind="Picture" ancestor="false"> > <property name="fileName" direction="desc" /> > </datastore-index> > </datastore-indexes> > > The query is : > > PersistenceManager pm = PMF.get().getPersistenceManager(); > javax.jdo.Query query = pm.newQuery(Picture.class); > query.setOrdering("fileName desc"); > List<Picture> Pictures = (List<Picture>) > pm.newQuery(query).execute(); > > The java class Picture is : > > �...@persistencecapable(identityType = IdentityType.APPLICATION) > public class Picture { > private static final Logger log = > Logger.getLogger(Picture.class.getName()); > > @PrimaryKey > private String fileName; > ... > > } > > thanks for your help > > -- > 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. > > -- 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.
