Skip to content

Cursor generation for joined table columns breaks pagination #29

@roykillany

Description

@roykillany
relation = Member.active.joins("LEFT JOIN memberships ON member.id = memberships.member_id")

RailsCursorPagination::Paginator.new(relation, order_by: "memberships.order", order: :desc)

generates cursors for the records w/o the distinct == or = suffixes (e.g. "W251bGwsMjYxNzRd")

im not sure if this in and of itself is an issue, but trying to use these cursors in further pagination calls always returns empty page data regardless of what combination of first/after or last/before i use.

e.g.

{:page_info=>{:has_previous_page=>true, :has_next_page=>false, :start_cursor=>nil, :end_cursor=>nil}, :page=>[]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions