Closed Pigrabbit closed 4 months ago
I guess this issue is caused by implementation of creating nextCursor
in CrudReadManyRequest.toResponse
method. Since View does not have primary key, it just returns the empty object {}
as a nextCursor.
In my opinion, we could solve this by let user to pass cursor pagination key according to their View implementation so that we could leverage it to create nextCursor.
What do u think @jiho-kr ?
I confirmed the problem through the issue you reported.
This happens when using cursor-based pagination
because the primary key
is used as the pagination key for the cursor.
I agree with providing a pagination key as an option.
I think there are two problems.
without a primary key
Order by
other than Primary key in SearchThis problem can be solved by
pagination keys as by option
primary key
as the default (current)order by
in search, use the order keys
.Let's solve them one by one, starting from 1.
@jiho-kr Are there any ongoing efforts related to this issue? Can I work on it? :)
Hi, there 👋🏼
I tried to use @Crud with TypeORM's ViewEntity and found out that Cursor pagination of search method is not working as I expected.
I'll share the test code I have written to let you recognize the problem below.