Ste*_*eve 13 google-app-engine objectify google-cloud-datastore
我目前正在使用Objectify 3.1构建一个部署到GAE的应用程序.尝试使用order()子句进行查询时,我得到了奇怪的结果.
我的域名:
public class InvoiceLineItem
{
    private int units;
    private BigDecimal unitCost;
    private BigDecimal extendedCost;
    private String description;
    @Parent Key<Invoice> invoice;
}
我试图使用以下内容收集与给定发票关联的所有InvoiceLineItem:
ofy ().query (InvoiceLineItem.class).ancestor (invoiceKey).list ( );
在我的测试用例中,这很好用,按预期返回2行.
但是,当我尝试向上述查询添加排序顺序时,如下所示:
ofy ().query (InvoiceLineItem.class).ancestor (invoiceKey).order ("+description").list ();
我总是得到0结果.我已经尝试改变顺序方向,它的排序字段,查询中order()子句的位置,都没有效果.任何人都能看到我在这里做错的事吗?
谢谢...
sti*_*ure 28
这里有几个潜在的问题:
Text为不可索引的字符| 归档时间: | 
 | 
| 查看次数: | 7780 次 | 
| 最近记录: |