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
I expected the size of the array to be 25 (default per page), holding only numbers 176..200.
My use case is that I'm paginating over two SQL tables, so my strategy was to retrieve the first page * per_page records from each table, sort them and paginate that collection in memory. Since the in-memory array doesn't hold the possible records that can be retrieved from the DB, I wanted to pass in total_count so that the last page button in the view works as expected.
The text was updated successfully, but these errors were encountered:
There was a historical reason why this is designed this way - #516. So changing this behaviour for this specific, possibly less common, use case would introduce a breaking change for other, possibly more common, use case.
In my experience, merging data from multiple tables has always been tricky to get right, and I personally wouldn't recommend that. For RDB, I think this should probably be handled at the DB-level features, such as SQL View or CTE.
Here is the example that demonstrates my scenario:
I expected the size of the array to be
25
(default per page), holding only numbers176..200
.My use case is that I'm paginating over two SQL tables, so my strategy was to retrieve the first
page * per_page
records from each table, sort them and paginate that collection in memory. Since the in-memory array doesn't hold the possible records that can be retrieved from the DB, I wanted to pass intotal_count
so that the last page button in the view works as expected.The text was updated successfully, but these errors were encountered: