Closed idododu closed 5 years ago
What database do you use? Please also show me your SQL schema.
I was kind of able to reproduce this using MySQL. Can you check if https://github.com/olavim/objection-cursor/commit/e2cbfe0b2f77a56c5a78aee64df5ee12a7b212d0 works for you.
I was kind of able to reproduce this using MySQL. Can you check if e2cbfe0 works for you.
Confirmed on local, it is fixed. By the way, my database is postgres
Fix is included in release 1.0.0-alpha.2
.
Description:
we have 12 records in a datable, crated column is date-time column, record 10, 11, 12 have the same created time because it is generated by db seeds. when we visit page 1(items 1-10), it is correct when click next btn to visit page 2(items 11-12), it returns empty.
Root Cause:
where condition
"created" = '2019-08-15T09:17:07.077Z'
will not work because string is not equal to date-time column valuesql generated by objection-cursor is:
Workaround:
when sorting by date column, use a
to_char
insteadPotential Solution:
Others: