Skip to content

CountOptions are not included in PaginateOptions #73

Open
@pbatr

Description

@pbatr

We are running into the problem that totalCount is wrong when using paginate with inner joins (most likely only with many-to-many relations but did not dig deeper). A workaround is to pass distinct: true parameter to .paginate() because since 401972b the query args are passed also to .count() and that fixes the issue. But now typescript is complaining because .paginate() only takes FindOptions and that type does not include distinct.

I would suggest to either update the type to include also CountOptions or include distinct: true in totalCountQueryOptions and cursorCountQueryOptions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions