简体   繁体   中英

Ordering with filter in Google app engine data store

In Google DataStore , I used ordering by one property and filtered by other property. But Datastore throws exception.

Lets say i filter property of firstname and ordered by creationdate

String firstname = "Smith";
query.setFilter("firstname == :1");
query.setOrdering("creationdate desc");
query.execute(firstname)

It is not working.

In the past I got an exception when we were dealing with multiple attributes; I was suggested to use indexing. See if that helps

https://developers.google.com/appengine/docs/java/config/indexconfig

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM