From 631317e6f0836a493554d837f1054593349bb896 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 12 Dec 2024 13:58:37 +0100 Subject: [PATCH] Trim selected fields --- packages/backend-core/src/sql/sql.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend-core/src/sql/sql.ts b/packages/backend-core/src/sql/sql.ts index 758dfa7fec..4691cd71ba 100644 --- a/packages/backend-core/src/sql/sql.ts +++ b/packages/backend-core/src/sql/sql.ts @@ -1591,7 +1591,7 @@ class InternalBuilder { const mainTable = this.query.tableAliases?.[table.name] || table.name const cte = this.addSorting( this.knex - .with("paginated", query) + .with("paginated", query.clone().clearSelect().select("*")) .select(this.generateSelectStatement()) .from({ [mainTable]: "paginated",