oradm-to-gql 35.0.6 → 35.0.8
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.
package/package.json
CHANGED
@@ -32,24 +32,22 @@ async function create{{makePlural(entityName)}}(createRecords, trx, opts){
|
|
32
32
|
let allowQuery = await Promise.resolve(this.entities.{{table.modelName}}.extensions.onCreate.allow.call(this, opts));
|
33
33
|
|
34
34
|
if(!allowQuery) return Promise.resolve([]);
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
{% endif %}
|
50
|
-
{% endfor %}
|
51
|
-
})
|
35
|
+
|
36
|
+
{% for propName, attrDef in table.attributes %}
|
37
|
+
{% set doneLoop = 'false' %}
|
38
|
+
{% if attrDef.dataType === 'Boolean' and doneLoop !== 'true' %}
|
39
|
+
createRecords.forEach(rec => {
|
40
|
+
{% for propName, attrDef in table.attributes %}
|
41
|
+
{% if attrDef.dataType === 'Boolean' %}
|
42
|
+
if (rec.{{attrDef.name}} === null) {
|
43
|
+
delete rec.{{attrDef.name}}
|
44
|
+
}
|
45
|
+
{% endif %}
|
46
|
+
{% endfor %}
|
47
|
+
})
|
48
|
+
{% set doneLoop = 'true' %}
|
52
49
|
{% endif %}
|
50
|
+
{% endfor %}
|
53
51
|
|
54
52
|
let records = await Promise.resolve(this.entities.{{table.modelName}}.extensions.onCreate.records.call(this, createRecords, opts));
|
55
53
|
|
@@ -22,23 +22,21 @@ async function update{{makePlural(entityName)}}(updateRecords, fkFilter, trx, op
|
|
22
22
|
|
23
23
|
if(!allowQuery) return Promise.resolve([]);
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
{% endif %}
|
39
|
-
{% endfor %}
|
40
|
-
})
|
25
|
+
{% for propName, attrDef in table.attributes %}
|
26
|
+
{% set doneLoop = 'false' %}
|
27
|
+
{% if attrDef.dataType === 'Boolean' and doneLoop !== 'true' %}
|
28
|
+
updateRecords.forEach(rec => {
|
29
|
+
{% for propName, attrDef in table.attributes %}
|
30
|
+
{% if attrDef.dataType === 'Boolean' %}
|
31
|
+
if (rec.{{attrDef.name}} === null) {
|
32
|
+
delete rec.{{attrDef.name}}
|
33
|
+
}
|
34
|
+
{% endif %}
|
35
|
+
{% endfor %}
|
36
|
+
})
|
37
|
+
{% set doneLoop = 'true' %}
|
41
38
|
{% endif %}
|
39
|
+
{% endfor %}
|
42
40
|
|
43
41
|
let records = await Promise.resolve(this.entities.{{table.modelName}}.extensions.onUpdate.records.call(this, updateRecords, opts));
|
44
42
|
|