On Dec 11, 5:26 pm, Benjamin Muschko <benjamin.musc...@googlemail.com> wrote: > Hi, > > I was trying out the new 1.4 SDK datastore metadata queries. Querying > for kinds works perfectly fine with this query and I get back results: > > Query query = new Query(Query.KIND_METADATA_KIND); > PreparedQuery preparedQuery = > DatastoreServiceFactory.getDatastoreService().prepare(query); > List<Entity> kinds = > preparedQuery.asList(FetchOptions.Builder.withDefaults()); > > However, when I try a similar query for properties I don't get back > anything even though I know that there are entities for at least one > kind in the datastore: > > Query query = new Query(Query.PROPERTY_METADATA_KIND); > PreparedQuery preparedQuery = datastore.prepare(query); > List<Entity> propertyMetaData = > preparedQuery.asList(FetchOptions.Builder.withDefaults()); > > I am not quite sure what I am doing wrong. According to the > documentation (http://code.google.com/appengine/docs/java/datastore/ > metadataqueries.html#Property_Queries) I am running the correct query. > Also, setting a specific ancestor doesn't work. Maybe somebody can > give me a hint here...
This should work. One possibility is that your properties are all unindexed - __property__ queries cannot find unindexed properties. -- David Gay d...@google.com -- 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 google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.