You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Hello,
I'm running into an issue when trying to use cursor pagination with columns that can have null values, even though I'm also using a unique non nullable column to build the Cursor (like id column).
I tried to do some research about it, and yeah it's not easy to implement, mainly because databases handle nulls differently.
And I also noticed that ordering with NULL FIRST | LAST doesn't work in mikro-orm with the cursor pagination.
For the moment, I switched to offset pagination to make it work.
Maybe the docs need to be updated to precise that it must be ordered by non-null columns.
One possible workaround could be using a formula property and adding a fallback to the null values (and using that for ordering instead of the nullable column).
atfera
changed the title
Support non nullable values in cursor pagination
Support nullable values in cursor pagination
Mar 22, 2024
Is your feature request related to a problem? Please describe.
Hello,
I'm running into an issue when trying to use cursor pagination with columns that can have null values, even though I'm also using a unique non nullable column to build the Cursor (like
id
column).I tried to do some research about it, and yeah it's not easy to implement, mainly because databases handle nulls differently.
And I also noticed that ordering with
NULL FIRST | LAST
doesn't work in mikro-orm with the cursor pagination.For the moment, I switched to offset pagination to make it work.
Maybe the docs need to be updated to precise that it must be ordered by non-null columns.
Reproduction
Error:
The text was updated successfully, but these errors were encountered: