[英]Ordering with filter in Google app engine data store
In Google DataStore
, I used ordering by one property and filtered by other property. 在
Google DataStore
,我使用了按一个属性排序并按另一个属性过滤的方法。 But Datastore throws exception. 但是数据存储区抛出异常。
Lets say i filter property of firstname and ordered by creationdate 假设我过滤了firstname的属性并按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 https://developers.google.com/appengine/docs/java/config/indexconfig
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.