|
|
@ -2617,7 +2617,7 @@ class BaseModelSqlv2 { |
|
|
|
data: Record<string, any>; |
|
|
|
data: Record<string, any>; |
|
|
|
insertObj: Record<string, any>; |
|
|
|
insertObj: Record<string, any>; |
|
|
|
}) { |
|
|
|
}) { |
|
|
|
const postInsertOps: ((rowId: any, trx?: any) => Promise<void>)[] = []; |
|
|
|
const postInsertOps: ((rowId: any, trx: any) => Promise<void>)[] = []; |
|
|
|
for (const col of nestedCols) { |
|
|
|
for (const col of nestedCols) { |
|
|
|
if (col.title in data) { |
|
|
|
if (col.title in data) { |
|
|
|
const colOptions = await col.getColOptions<LinkToAnotherRecordColumn>(); |
|
|
|
const colOptions = await col.getColOptions<LinkToAnotherRecordColumn>(); |
|
|
@ -2650,7 +2650,7 @@ class BaseModelSqlv2 { |
|
|
|
async ( |
|
|
|
async ( |
|
|
|
rowId, |
|
|
|
rowId, |
|
|
|
// todo: use transaction type
|
|
|
|
// todo: use transaction type
|
|
|
|
trx?: any = this.dbDriver, |
|
|
|
trx: any = this.dbDriver, |
|
|
|
) => { |
|
|
|
) => { |
|
|
|
await trx(this.getTnPath(childModel.table_name)) |
|
|
|
await trx(this.getTnPath(childModel.table_name)) |
|
|
|
.update({ |
|
|
|
.update({ |
|
|
@ -2669,7 +2669,7 @@ class BaseModelSqlv2 { |
|
|
|
async ( |
|
|
|
async ( |
|
|
|
rowId, |
|
|
|
rowId, |
|
|
|
// todo: use transaction type
|
|
|
|
// todo: use transaction type
|
|
|
|
trx?: any = this.dbDriver, |
|
|
|
trx: any = this.dbDriver, |
|
|
|
) => { |
|
|
|
) => { |
|
|
|
const parentModel = await colOptions |
|
|
|
const parentModel = await colOptions |
|
|
|
.getParentColumn() |
|
|
|
.getParentColumn() |
|
|
|