Open
Description
I've tried to update an item in my table. The table's HASH and RANGE keys are both numbers. In my case RANGE key was 0. I've received an error:
UnhandledPromiseRejectionWarning: ValidationException: The provided key element does not match the schema
Relevant code in table.js:
var rangeKey = data[self.schema.rangeKey] || null;
How to reproduce this issue:
- Create a table with RANGE key as a number;
- Run update request with range key 0:
DynamoDBItem.update({hash: 123, range: 0}).
Note: Event.create can save items with range key being zero.
As a result I cannot update an item with rangeKey=0 using this module. I'll have to go with AWS.DynamoDB.DocumentClient
.
Metadata
Metadata
Assignees
Labels
No labels