diff --git a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts index 429252ae59..25f5d7c348 100644 --- a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts +++ b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts @@ -1987,11 +1987,15 @@ class BaseModelSqlv2 { async bulkDelete(ids: any[], { cookie }: { cookie?: any } = {}) { let transaction; try { + const deleteIds = await Promise.all( + ids.map((d) => this.model.mapAliasToColumn(d)) + ); + transaction = await this.dbDriver.transaction(); // await this.beforeDeleteb(ids, transaction); const res = []; - for (const d of ids) { + for (const d of deleteIds) { if (Object.keys(d).length) { const response = await transaction(this.model.table_name) .del()