electrodb 2.14.1 → 2.14.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/entity.js +10 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electrodb",
3
- "version": "2.14.1",
3
+ "version": "2.14.3",
4
4
  "description": "A library to more easily create and interact with multiple entities and heretical relationships in dynamodb",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -88,7 +88,7 @@
88
88
  "directory": "test"
89
89
  },
90
90
  "dependencies": {
91
- "@aws-sdk/lib-dynamodb": "^3.395.0",
91
+ "@aws-sdk/lib-dynamodb": "3.395.0",
92
92
  "jsonschema": "1.2.7"
93
93
  }
94
94
  }
package/src/entity.js CHANGED
@@ -3121,8 +3121,16 @@ class Entity {
3121
3121
  indexHasSk && this.model.facets.byIndex[index].sk.length === 0;
3122
3122
  let hasPrefix =
3123
3123
  indexHasSk && this.model.prefixes[index].sk.prefix !== undefined;
3124
- if (noImpactSk && noAttributeSk && hasPrefix) {
3125
- keys.sk.push(this.model.prefixes[index].sk.prefix);
3124
+ let hasPostfix =
3125
+ indexHasSk && this.model.prefixes[index].sk.prefix !== undefined;
3126
+ if (noImpactSk && noAttributeSk) {
3127
+ let key = hasPrefix ? this.model.prefixes[index].sk.prefix : '';
3128
+ if (hasPostfix) {
3129
+ key = `${key}${this.model.prefixes[index].sk.postfix}`;
3130
+ }
3131
+ if (key) {
3132
+ keys.sk.push(key);
3133
+ }
3126
3134
  }
3127
3135
  }
3128
3136