The getCursor() javadoc said:
Returns: a Cursor or null if this query result cannot be resumed
What does the word "resumed" mean in the context?
My code is like below:
com.googlecode.objectify.cmd.Query q = createQuery();
QueryResultIterator<T> itr = q.iterator();
while( itr.hasNext() )
{
list.add( itr.next() );
}
...
String newCursorValue = itr.getCursor().toWebSafeString();
It throws NPE just because itr.getCursor() is emtpy. This method works well for a long time but fails today when i modify the Query condition(but it is valid). But i can't see why the query condition can affect the getCursor() method.
Anybody please shed some light? By the way i use GAE/J v1.7.1, Objectify 4a3.
You should read about limitations of cursors. This basically defines when query can be "resumed".
If 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