dobo 2.26.2 → 2.26.3
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.
|
@@ -20,8 +20,8 @@ async function createRecord (...args) {
|
|
|
20
20
|
await execDynHook.call(this, 'beforeCreateRecord', input, options)
|
|
21
21
|
if (!noValidation) await execValidation.call(this, input, options)
|
|
22
22
|
let result = options.record ?? (await this.driver._createRecord(this, input, options)) ?? {}
|
|
23
|
-
await handleReq.call(this, result.data.id, 'created', options)
|
|
24
23
|
if (noResult) return
|
|
24
|
+
await handleReq.call(this, result.data.id, 'created', options)
|
|
25
25
|
result = result ?? {}
|
|
26
26
|
const { warnings } = getDefaultValues(options)
|
|
27
27
|
if (!warnings) delete result.warnings
|
|
@@ -45,9 +45,9 @@ async function removeRecord (...args) {
|
|
|
45
45
|
await execModelHook.call(this, 'beforeRemoveRecord', id, options)
|
|
46
46
|
await execDynHook.call(this, 'beforeRemoveRecord', id, options)
|
|
47
47
|
const result = options.record ?? (await this.driver._removeRecord(this, id, options)) ?? {}
|
|
48
|
+
if (noResult) return
|
|
48
49
|
await handleReq.call(this, result.oldData.id, 'removed', options)
|
|
49
50
|
await clearCache.call(this, id)
|
|
50
|
-
if (noResult) return
|
|
51
51
|
const { warnings } = getDefaultValues(options)
|
|
52
52
|
if (!warnings) delete result.warnings
|
|
53
53
|
if (!noResultSanitizer) result.oldData = await this.sanitizeRecord(result.oldData, options)
|
|
@@ -67,9 +67,9 @@ async function updateRecord (...args) {
|
|
|
67
67
|
await execDynHook.call(this, 'beforeUpdateRecord', id, input, options)
|
|
68
68
|
if (!noValidation) await execValidation.call(this, input, options)
|
|
69
69
|
const result = await this.driver._updateRecord(this, id, input, options)
|
|
70
|
+
if (noResult) return
|
|
70
71
|
await handleReq.call(this, result.data.id, 'updated', options)
|
|
71
72
|
await clearCache.call(this, id)
|
|
72
|
-
if (noResult) return
|
|
73
73
|
const { warnings } = getDefaultValues(options)
|
|
74
74
|
if (!warnings) delete result.warnings
|
|
75
75
|
if (isSet(options.refs)) await getRefs.call(this, [result.data], options)
|
|
@@ -16,9 +16,9 @@ async function native (body = {}, opts = {}) {
|
|
|
16
16
|
await execModelHook.call(this, 'beforeUpsertRecord', input, options)
|
|
17
17
|
await execDynHook.call(this, 'beforeUpsertRecord', input, options)
|
|
18
18
|
const result = options.record ?? (await this.driver._upsertRecord(this, input, options)) ?? {}
|
|
19
|
+
if (noResult) return
|
|
19
20
|
await handleReq.call(this, result.data.id, 'upserted', options)
|
|
20
21
|
await clearCache.call(this, body.id)
|
|
21
|
-
if (noResult) return
|
|
22
22
|
const { warnings } = getDefaultValues(options)
|
|
23
23
|
if (!warnings) delete result.warnings
|
|
24
24
|
if (isSet(options.refs)) await getRefs.call(this, [result.data], options)
|
package/package.json
CHANGED
package/wiki/CHANGES.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-05-29
|
|
4
|
+
|
|
5
|
+
- [2.26.1] Bug fix in ```model.updateRecord()```
|
|
6
|
+
- [2.26.1] Bug fix in ```model.upsertRecord()```
|
|
7
|
+
- [2.26.1] Bug fix in ```model.removeRecord()```
|
|
8
|
+
|
|
3
9
|
## 2026-05-26
|
|
4
10
|
|
|
5
11
|
- [2.26.0] Add loading multiple model schema as in one ```model.js``` file
|