Wappler Version : 3.2.1
Operating System : Windows 10
NodeJS, Docker, Postgres 11.x project
Expected behavior
When creating a paged query record, the total number of records in the pagination data should match the total number of records in the actual query.
Actual behavior
The total number of records showing in the pagination total count are vastly different to the actual number of records in the returned query.
This picture shows that the query result only has 7 records (using pagination for there will be more records later) but the total showing in the offset data is 5425 or 218 pages at 25 records per page.
This only occurs in a certain query where i am returning a list of records and then when i add a data metric which uses a SUM aggregate, the query then ends up like this.
How to reproduce
As above, not sure if this can be reproduced, but in this below query, it works as expected until i add the highlighted column. Once i add it, the paged will shows 5425 results in the offset total.
I’ve also tried the last join as LEFT as well and it made no difference.
Bottom line is that the query only returns 7 records in this instance, but something is causing a bug.
Last updated: