diff --git a/packages/backend-core/src/sql/sql.ts b/packages/backend-core/src/sql/sql.ts index 4ec9246cbb..d7d7235f3a 100644 --- a/packages/backend-core/src/sql/sql.ts +++ b/packages/backend-core/src/sql/sql.ts @@ -1210,18 +1210,16 @@ 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) - } - } else if (schema.autocolumn && schema.autoReason === "foreign_key") - return this.knex - .raw(`?${separator}??`, [unaliased, identifier]) - .toString() + // 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() } maxFunctionParameters() { diff --git a/packages/server/src/api/routes/tests/row.spec.ts b/packages/server/src/api/routes/tests/row.spec.ts index 0752d38f17..28542a8701 100644 --- a/packages/server/src/api/routes/tests/row.spec.ts +++ b/packages/server/src/api/routes/tests/row.spec.ts @@ -3549,7 +3549,7 @@ if (descriptions.length) { _id: "%5B'1'%5D", _rev: "rev", id: "1", - related: [ + many: [ { _id: "%5B'1'%5D", primaryDisplay: 1,