nestjs-typeorm-paginate icon indicating copy to clipboard operation
nestjs-typeorm-paginate copied to clipboard

Paginate with queryBuilder counts raw number of rows instead of entity number of rows.

Open linconsdev opened this issue 2 years ago • 3 comments

image

This is the meta output for only 40 rows of one entity. Im using queryBuilder and leftJoinAndMapOne and mapMany to get relationships. I don't understand where this totalItems number 2559 is coming from. It is easy to replicate, happens on every queryBuilder I've made.

Can this issue be addressed?

linconsdev avatar Nov 18 '22 10:11 linconsdev

Can we have this solution merged into actual package?

linconsdev avatar Jan 04 '23 15:01 linconsdev

I am also facing the same similar issue related limit i should get 20 results but ended up getting 3 only i am using subquery way but query results coming fine but problem with pagination

Screenshot 2023-09-12 at 11 53 34 AM

salauddinn avatar Sep 12 '23 06:09 salauddinn

@linconsdev or @bashleigh , please consider closing this issue as a duplicate of 627.

psam44 avatar Nov 16 '23 16:11 psam44