What is the syntax for getItems with a composite primary key?
aneilbaboo opened this issue · 1 comments
aneilbaboo commented
The documentation only shows an example like Model.getItems(["hashkey1", "hashkey2"], ...
. The AWS documentation indicates that for a table with a composite primary key you must pass both the hash and rangeKey.
Does Dynogels accept an array of arrays like this?
Model.getItems([['hk1', 'rangeKey1' ], ['hk2', 'rangeKey2'], ...], ...)
cdhowie commented
I don't recall if that is supported, but I know that an array of objects is supported:
Model.getItems([
{ hashKey: 'value1', rangeKey: 'value2' },
{ hashKey: 'value3', rangeKey: 'value4' },
...
])
(Where hashKey
and rangeKey
are the actual attribute names for your hash key and range key.)