Difference between Model.offset().limit() and Model.limit().offset()

Viewed 9530

I don't understand the reason for doing Model.limit(6).offset(5) when we have to get 6 elements starting from the 6th index. I think that it should be Model.offset(5).limit(6) since we first have to tell the index from which we have to start retrieving the elements and then limit the search to the number of elements passed as argument to limit, and not the other way round.

3 Answers
Related