From 50a7539e2589481cc35a7043327403a5b63ebf18 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Mon, 25 Nov 2024 17:53:03 +0000 Subject: [PATCH] Revert "wip" This reverts commit d1b0bf965b15cee6e57c770e13a065c94496258a. --- packages/backend-core/src/sql/sql.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/backend-core/src/sql/sql.ts b/packages/backend-core/src/sql/sql.ts index d7d7235f3a..b8aaca0f71 100644 --- a/packages/backend-core/src/sql/sql.ts +++ b/packages/backend-core/src/sql/sql.ts @@ -1210,15 +1210,15 @@ class InternalBuilder { const separator = this.client === SqlClient.ORACLE ? " VALUE " : "," let identifier = this.rawQuotedIdentifier(tableField) - // if (schema.type === FieldType.BIGINT) { - // identifier = this.castIntToString(identifier) - // } else if (schema.type === FieldType.LINK) { - // const otherTable = this.query.meta.tables![schema.tableId] - // const otherField = otherTable.schema[schema.fieldName] - // if (otherField.type === FieldType.BIGINT) { - // identifier = this.castIntToString(identifier) - // } - // } + if (schema.type === FieldType.BIGINT) { + identifier = this.castIntToString(identifier) + } else if (schema.type === FieldType.LINK) { + const otherTable = this.query.meta.tables![schema.tableId] + const otherField = otherTable.schema[schema.fieldName] + if (otherField.type === FieldType.BIGINT) { + identifier = this.castIntToString(identifier) + } + } return this.knex.raw(`?${separator}??`, [unaliased, identifier]).toString() }