I'm currently building an app for deployment to GAE, using Objectify 3.1. I am getting strange results when attempting to do a query with an order() clause.
My domain:
public class InvoiceLineItem
{
private int units;
private BigDecimal unitCost;
private BigDecimal extendedCost;
private String description;
@Parent Key<Invoice> invoice;
}
I am attempting to gather all of the InvoiceLineItems associated with a given Invoice using the following:
ofy ().query (InvoiceLineItem.class).ancestor (invoiceKey).list ( );
In my test case, this works just fine, returning 2 rows as expected.
However, when I try to add a sort order to the above query, like so:
ofy ().query (InvoiceLineItem.class).ancestor (invoiceKey).order ("+description").list ();
I always get 0 results. I've tried changing the order direction, the field its ordering by, the location of the order () clause in the query, all to no effect. Can anyone see anything that I'm doing wrong here?
Thanks...
There are a couple potential issues here:
Text
which is not indexableIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With