Closed Go1dExperience closed 2 years ago
It sounds like you are ordering by a column set that is not unique between rows. The status
column doesn't sound like it holds unique values, at least. If your model has some unique id column, try ordering with both status
and id
.
With cursor-based pagination it's important that we can say something like "give me 15 rows after this row", and it's therefore important that we can uniquely identify a specific row. If your ordering is based on a column set that can occur multiple times in a table, we cannot know which of those rows you meant exactly.
Yep that's exactly the problem. Don't know how I could miss that, but thank you very much for you help. Closing the issue now.
objection-cursor: 1.2.5 objection: 1.6.11.
Hi, thank you very much for creating this wonderful library. In our projects, we notice that sometimes it will skip some records. Most of the time it will probably be about 5, 10 records, but in a special case where I'm ordering by status(1,2,3(, it skips 700 records and jump directly from first page to last page. Unfortunately I cannot share a code because it's very huge, but just want to know your opinion, because when I bring the query generated by the library to SQL, then it will give the correct number of records, so I believe it might be something with the library itself. Have you encountered a similar situation? Thank you.