benjamin658 / typeorm-cursor-pagination

Cursor-based pagination works with TypeORM Query Builder.
MIT License
184 stars 39 forks source link

Modified query causes incorrect results #59

Closed stuartf123 closed 1 year ago

stuartf123 commented 2 years ago

Hi Benjamin, you have added the field paginationUniqueKey. This appears to result in missing rows when paging through a collection.

My class does not have a single column as a primary key, but the primary key is made from 3 columns. In this scenario, what should the value of this new field be?

benjamin658 commented 2 years ago

How about just using paginationKeys?

stuartf123 commented 2 years ago

I am not explicitly setting the value of the paginationUniqueKey. I believe you default the column name to be 'id' and so this results in your code still appending your additional criteria

Thx

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Ben Who @.> Sent: Thursday, July 21, 2022 1:57:00 AM To: benjamin658/typeorm-cursor-pagination @.> Cc: stuartf123 @.>; Author @.> Subject: Re: [benjamin658/typeorm-cursor-pagination] Modified query causes incorrect results (Issue #59)

How about just using paginationKeys ?

— Reply to this email directly, view it on GitHubhttps://github.com/benjamin658/typeorm-cursor-pagination/issues/59#issuecomment-1191226651, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABD3XDEMNQYK7JTI26WCOATVVEGFZANCNFSM54GW4OUA. You are receiving this because you authored the thread.Message ID: @.***>

benjamin658 commented 2 years ago

Would you mind providing the entity and sample data?

benjamin658 commented 1 year ago

In the v0.10.0 release, paginationUniqueKey has been removed. Please upgrade and try again.