Fix formulas on internal

This commit is contained in:
Adria Navarro 2024-12-16 10:53:45 +01:00
parent f92fcea42a
commit f8ece82648
1 changed files with 4 additions and 5 deletions

View File

@ -315,11 +315,10 @@ class InternalBuilder {
})
.filter(({ table }) => !table || table === alias)
if (
this.isFullSelectStatementRequired(
tableFields.map(({ column }) => column)
)
) {
const requestedTableColumns = tableFields.map(({ column }) =>
column.replace(new RegExp(`^${this.query.meta?.columnPrefix}`), "")
)
if (this.isFullSelectStatementRequired(requestedTableColumns)) {
return [this.knex.raw("??", [`${alias}.*`])]
}