@live-change/relations-plugin 0.9.28 → 0.9.29

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/relations-plugin",
3
- "version": "0.9.28",
3
+ "version": "0.9.29",
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.9.28",
25
+ "@live-change/framework": "^0.9.29",
26
26
  "pluralize": "^8.0.0"
27
27
  },
28
- "gitHead": "f308e368e678fa38ddef6a6d4999ad730b18e8ce"
28
+ "gitHead": "425e1d43a7359693059b41692d1fe04e12d5f0b1"
29
29
  }
@@ -327,7 +327,7 @@ function getResetFunction(config, context) {
327
327
  service, app, model, modelRuntime, objectType, modelPropertyName,
328
328
  otherPropertyNames, joinedOthersPropertyName, modelName, writeableProperties, joinedOthersClassName
329
329
  } = context
330
- const eventName = joinedOthersPropertyName + context.reverseRelationWord + modelName + 'Reset'
330
+ const eventName = modelName + 'Reset'
331
331
  return async function execute(properties, {client, service}, emit) {
332
332
  const identifiers = extractIdentifiersWithTypes(otherPropertyNames, properties)
333
333
  const id = properties[modelPropertyName] ?? generateAnyId(otherPropertyNames, properties)
package/utilsAny.js CHANGED
@@ -163,8 +163,9 @@ export function addAccessControlAnyParents(context) {
163
163
  }).filter(parent => parent.object && parent.objectType)
164
164
  }
165
165
  context.model.accessControlParentsSource = context.otherPropertyNames.map(
166
- otherPropertyName => ({
167
- property: otherPropertyName
166
+ (otherPropertyName, index) => ({
167
+ property: otherPropertyName,
168
+ possibleTypes: context.otherPossibleTypes[index]
168
169
  })
169
170
  )
170
171
  }