Browse Source

fix: mm unlink implementation

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5901/head
Pranav C 2 years ago
parent
commit
c9ebfad467
  1. 11
      packages/nocodb/src/db/BaseModelSqlv2.ts

11
packages/nocodb/src/db/BaseModelSqlv2.ts

@ -3773,15 +3773,18 @@ class BaseModelSqlv2 {
await this.dbDriver(vTn)
.where({
[vParentCol.column_name]: this.dbDriver(parentTn)
.select(parentColumn.column_name)
.whereIn(parentTable.primaryKey.column_name, childIds)
.first(),
[vChildCol.column_name]: this.dbDriver(childTn)
.select(childColumn.column_name)
.where(_wherePk(childTable.primaryKeys, rowId))
.first(),
})
.whereIn(
[vParentCol.column_name],
this.dbDriver(parentTn)
.select(parentColumn.column_name)
.whereIn(parentTable.primaryKey.column_name, childIds)
.first(),
)
.delete();
}
break;

Loading…
Cancel
Save