diff --git a/packages/backend/src/models/_.ts b/packages/backend/src/models/_.ts index 0d60e4b17b..c82d7a6334 100644 --- a/packages/backend/src/models/_.ts +++ b/packages/backend/src/models/_.ts @@ -115,7 +115,7 @@ export const miRepository = { return builder.select(selection, selectionAliasName); }; for (const columnName of this.createTableColumnNames(queryBuilder)) { - selectOrAddSelect(`${builder.alias}.${columnName}`, `${builder.alias}_${columnName.slice('__disambiguation__'.length)}`); + selectOrAddSelect(`"${builder.alias}"."${columnName}"`, `${builder.alias}_${columnName.slice('__disambiguation__'.length)}`); } }, } satisfies MiRepository;