@naturalcycles/db-lib 9.15.0 → 9.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -486,7 +486,11 @@ class CommonDao {
|
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
488
|
else {
|
|
489
|
-
|
|
489
|
+
const table = opt.table || this.cfg.table;
|
|
490
|
+
(0, js_lib_1._assert)(!opt.requireToExist, `${table}.patchById row is required, but missing`, {
|
|
491
|
+
id,
|
|
492
|
+
table,
|
|
493
|
+
});
|
|
490
494
|
patched = this.create({ ...patch, id }, opt);
|
|
491
495
|
}
|
|
492
496
|
return await this.save(patched, opt);
|
package/package.json
CHANGED
|
@@ -656,7 +656,11 @@ export class CommonDao<BM extends BaseDBEntity, DBM extends BaseDBEntity = BM> {
|
|
|
656
656
|
return patched
|
|
657
657
|
}
|
|
658
658
|
} else {
|
|
659
|
-
|
|
659
|
+
const table = opt.table || this.cfg.table
|
|
660
|
+
_assert(!opt.requireToExist, `${table}.patchById row is required, but missing`, {
|
|
661
|
+
id,
|
|
662
|
+
table,
|
|
663
|
+
})
|
|
660
664
|
patched = this.create({ ...patch, id }, opt)
|
|
661
665
|
}
|
|
662
666
|
|