shiftcode / dynamo-easy

DynamoDB client for NodeJS and browser with a fluent api to build requests. We take care of the type mapping between JS and DynamoDB, customizable trough typescript decorators.
https://shiftcode.github.io/dynamo-easy/
MIT License
204 stars 27 forks source link

Query indexName, whereParitionKey, whereSortKey order matters #358

Open danielblignaut opened 2 years ago

danielblignaut commented 2 years ago

Describe the bug On a query request, you have to specify indexName before your partition or sortKey value otherwise the parition and sort key values are not assigned to the correct model key (they will be assigned to the @PartitionKey and @SortKey instead of the correct gsi key).

Whilst this is a bug, I think the correct fix is rather to just update the docs to explicitly reference this.