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
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.
The text was updated successfully, but these errors were encountered:
Did I understand correctly, that including dinstinct?: boolean to PaginateOptions type and passing the distinct to the count query would work in this case?
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 takesFindOptions
and that type does not includedistinct
.I would suggest to either update the type to include also
CountOptions
or includedistinct: true
intotalCountQueryOptions
andcursorCountQueryOptions
.The text was updated successfully, but these errors were encountered: