diff --git a/plugins/dbgate-plugin-cassandra/src/backend/createBulkInsertStream.js b/plugins/dbgate-plugin-cassandra/src/backend/createBulkInsertStream.js index e920e2123..1952e5938 100644 --- a/plugins/dbgate-plugin-cassandra/src/backend/createBulkInsertStream.js +++ b/plugins/dbgate-plugin-cassandra/src/backend/createBulkInsertStream.js @@ -35,7 +35,7 @@ function getShouldAddUuidPkInfo(tableInfo) { const columnInfo = getColumnInfo(tableInfo, pkColumnName); if (!columnInfo) return { shouldAddUuidPk: false }; - const shouldAddUuidPk = writable.columnNames.every((i) => i !== columnInfo.columnName); + const shouldAddUuidPk = tableInfo.columns.every((i) => i.columnName !== columnInfo.columnName); if (!shouldAddUuidPk) return { shouldAddUuidPk }; return { shouldAddUuidPk, pkColumnName };