@live-change/relations-plugin 0.8.114 → 0.8.116

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/utils.js +4 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/relations-plugin",
3
- "version": "0.8.114",
3
+ "version": "0.8.116",
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.114",
25
+ "@live-change/framework": "^0.8.116",
26
26
  "pluralize": "^8.0.0"
27
27
  },
28
- "gitHead": "1a5a437aae382d766c2806a11f805370ee8cc40a"
28
+ "gitHead": "32131af3707ec744c9d314035676d09512483799"
29
29
  }
package/utils.js CHANGED
@@ -48,14 +48,15 @@ export function defineIndex(model, what, props) {
48
48
  })
49
49
  }
50
50
  export function defineIndexes(model, props, types) {
51
- console.log("DEFINE INDEXES", model.name, props, types)
52
- const propCombinations = allCombinations(Object.keys(props))
51
+ console.log("DEFINE INDEXES!", model.name, props, types)
52
+ const propCombinations = allCombinations(Object.keys(props)) /// combinations of indexes
53
53
  for(const propCombination of propCombinations) {
54
54
  const upperCaseProps = propCombination.map(id => {
55
55
  const prop = props[id]
56
56
  return prop[0].toUpperCase() + prop.slice(1)
57
57
  })
58
- defineIndex(model, upperCaseProps.join('And'), propCombination)
58
+ const indexProps = propCombination.map(id => props[id])
59
+ defineIndex(model, upperCaseProps.join('And'), indexProps)
59
60
  }
60
61
  }
61
62