Good day!

I've a doubt about the semantics of the setStartAtIndex - setEndAtIndex methods of the 
Query Class.

In the most simply case, without a orderBy clause, this methods return all the rows in 
the range specified.
But, in a more complex case with the use of the addOrderByDescending() or 
addOrderByAscending() the result is not consistent. Let me explain the results:

I had 13 records on the DBMS, named: 1,2,3...until 13

If I use the setStartAtIndex and setEndAtIndex in blocks of 5 elements without order I 
got:
1 to 5
6 to 10
11 to 13 -> PERFECT!!

but I use the orderByClause I got:
1 to 5
6 to 10
1 to 2 (?????!!!!! WHY? )

Is that the expected behavior? Am I missing something??

Thanks in advance!!!


Ing. Gerardo Arroyo Arce
Flecha Roja Technologies

Reply via email to