It stores only PersonId in the cursor but then tries to get both PersonId and PostId out of it. That is impossible.
|
let prefixes_and_ids = [('P', self.creator.id.0)]; |
|
let [(_, person_id), (_, post_id)] = cursor.prefixes_and_ids()?; |
As part of #6159 I tried to fix in the same way to cursors for SearchCombinedView are handled. But that also doesnt work, because CursorData must be the same type which is used as key for .then_order_by() (here SearchCombined). For VoteView this doesnt work because there is no table VoteCombined.
So Im disabling the broken pagination code for now until we can find a solution. Still Im keeping the api structs with pagination cursors so this can be fixed without a breaking change.
Edit: The best solution is probably to have two separate structs VoteViewPost and VoteViewComment, each handling pagination separately. These can be converted to a single VoteView for the api.
It stores only PersonId in the cursor but then tries to get both PersonId and PostId out of it. That is impossible.
lemmy/crates/db_views/vote/src/impls.rs
Line 32 in 2e60451
lemmy/crates/db_views/vote/src/impls.rs
Line 42 in 2e60451
As part of #6159 I tried to fix in the same way to cursors for SearchCombinedView are handled. But that also doesnt work, because
CursorDatamust be the same type which is used as key for.then_order_by()(hereSearchCombined). For VoteView this doesnt work because there is no tableVoteCombined.So Im disabling the broken pagination code for now until we can find a solution. Still Im keeping the api structs with pagination cursors so this can be fixed without a breaking change.
Edit: The best solution is probably to have two separate structs
VoteViewPostandVoteViewComment, each handling pagination separately. These can be converted to a singleVoteViewfor the api.