electrodb 2.9.2 → 2.9.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.
- package/package.json +1 -1
- package/src/clauses.js +2 -2
package/package.json
CHANGED
package/src/clauses.js
CHANGED
|
@@ -314,7 +314,7 @@ let clauses = {
|
|
|
314
314
|
let record = entity.model.schema.checkCreate({...payload});
|
|
315
315
|
const attributes = state.getCompositeAttributes();
|
|
316
316
|
const filter = state.query.filter[ExpressionTypes.ConditionExpression];
|
|
317
|
-
const {pk, sk} = entity._getPrimaryIndexFieldNames();
|
|
317
|
+
const { pk, sk } = entity._getPrimaryIndexFieldNames();
|
|
318
318
|
filter.unsafeSet(FilterOperationNames.notExists, pk);
|
|
319
319
|
if (sk) {
|
|
320
320
|
filter.unsafeSet(FilterOperationNames.notExists, sk);
|
|
@@ -456,7 +456,7 @@ let clauses = {
|
|
|
456
456
|
if (!wasSet) {
|
|
457
457
|
throw new e.ElectroError(e.ErrorCodes.DuplicateUpdateCompositesProvided, `The composite attribute ${attrName} has been provided more than once with different values. Remove the duplication before running again`);
|
|
458
458
|
}
|
|
459
|
-
state.applyCondition(FilterOperationNames.
|
|
459
|
+
state.applyCondition(FilterOperationNames.eq, attrName, composites[attrName]);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
462
|
return state;
|