|
|
@ -1943,16 +1943,14 @@ class BaseModelSqlv2 { |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const where = await this._wherePk(id); |
|
|
|
if (!trx) { |
|
|
|
if (!trx) { |
|
|
|
trx = await this.dbDriver.transaction(); |
|
|
|
trx = await this.dbDriver.transaction(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
await Promise.all(execQueries.map((q) => q(trx))); |
|
|
|
await Promise.all(execQueries.map((q) => q(trx))); |
|
|
|
|
|
|
|
|
|
|
|
const response = await trx(this.tnPath) |
|
|
|
const response = await trx(this.tnPath).del().where(where); |
|
|
|
.del() |
|
|
|
|
|
|
|
.where(await this._wherePk(id)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!_trx) await trx.commit(); |
|
|
|
if (!_trx) await trx.commit(); |
|
|
|
|
|
|
|
|
|
|
|