@live-change/relations-plugin 0.8.62 → 0.8.64
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 +3 -3
- package/pluralRelationUtils.js +1 -1
- package/utils.js +2 -1
- package/utilsAny.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/relations-plugin",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.64",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"type": "module",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@live-change/framework": "^0.8.
|
|
25
|
+
"@live-change/framework": "^0.8.64",
|
|
26
26
|
"pluralize": "^8.0.0"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "cf14b283170cd39b80a57865e9b5eb9cf2073f39"
|
|
29
29
|
}
|
package/pluralRelationUtils.js
CHANGED
|
@@ -138,7 +138,7 @@ function getUpdateFunction( validators, validationContext, config, context) {
|
|
|
138
138
|
extractObjectData(writeableProperties, properties, entity),
|
|
139
139
|
App.computeUpdates(model, { ...entity, ...properties }, { client, service })
|
|
140
140
|
)
|
|
141
|
-
await App.validation.validate({ ...identifiers, ...data }, validators,
|
|
141
|
+
await App.validation.validate({ ...identifiers, ...data, [modelPropertyName]: id }, validators,
|
|
142
142
|
validationContext)
|
|
143
143
|
await fireChangeTriggers(context, objectType, identifiers, id,
|
|
144
144
|
extractObjectData(writeableProperties, entity, {}), data)
|
package/utils.js
CHANGED
|
@@ -124,7 +124,8 @@ export function processModelsAnnotation(service, app, annotation, multiple, cb)
|
|
|
124
124
|
|
|
125
125
|
export function addAccessControlParents(context) {
|
|
126
126
|
const { modelRuntime } = context
|
|
127
|
-
context.model.accessControlParents = async (
|
|
127
|
+
context.model.accessControlParents = async (what) => {
|
|
128
|
+
const id = what.object
|
|
128
129
|
const data = await modelRuntime().get(id)
|
|
129
130
|
return context.otherPropertyNames.map(otherPropertyName => {
|
|
130
131
|
const objectType = (otherPropertyName.slice(0, 1).toUpperCase() + otherPropertyName.slice(1))
|
package/utilsAny.js
CHANGED
|
@@ -134,7 +134,9 @@ function processModelsAnyAnnotation(service, app, annotation, multiple, cb) {
|
|
|
134
134
|
|
|
135
135
|
function addAccessControlAnyParents(context) {
|
|
136
136
|
const { modelRuntime } = context
|
|
137
|
-
context.model.accessControlParents = async (
|
|
137
|
+
context.model.accessControlParents = async (what) => {
|
|
138
|
+
const id = what.object
|
|
139
|
+
console.log("PROPERTY OF ANY ACCESS CONTROL PARENTS", context.model.name, '/', id)
|
|
138
140
|
const data = await modelRuntime().get(id)
|
|
139
141
|
return context.otherPropertyNames.map(otherPropertyName => {
|
|
140
142
|
const objectType = data[otherPropertyName + 'Type']
|