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.
Having multiply @GSISortKey on the same property results in the following errors. One would expect this to work; especially since single table design is the new hotness :)
the undefined might be an indicator that this is me; as I think from my quick glance you
handle this usecase
{
"errorType": "Error",
"errorMessage": "there is already a partition key defined for global secondary index undefined (property name: phoneNumber)",
"stack": [
"Error: there is already a partition key defined for global secondary index undefined (property name: phoneNumber)",
" at /var/task/node_modules/@shiftcoders/dynamo-easy/src/decorator/impl/model/model.decorator.ts:93:19",
" at Array.forEach (<anonymous>)",
" at /var/task/node_modules/@shiftcoders/dynamo-easy/src/decorator/impl/model/model.decorator.ts:83:37",
" at Array.reduce (<anonymous>)",
" at getGlobalSecondaryIndexes (/var/task/node_modules/@shiftcoders/dynamo-easy/src/decorator/impl/model/model.decorator.ts:81:40)",
" at /var/task/node_modules/@shiftcoders/dynamo-easy/src/decorator/impl/model/model.decorator.ts:38:41",
" at DecorateConstructor (/var/task/node_modules/reflect-metadata/Reflect.js:541:33)",
" at Object.decorate (/var/task/node_modules/reflect-metadata/Reflect.js:130:24)",
" at __decorate (/var/task/node_modules/@holiday-fox/user-models/dist/models/user.js:4:92)",
" at Object.<anonymous> (/var/task/node_modules/@holiday-fox/user-models/src/models/user.ts:12:18)"
]
}
Additional context
Add any other context about the problem here.
To Reproduce
Model Below
Expected behavior
Having multiply
@GSISortKey
on the same property results in the following errors. One would expect this to work; especially since single table design is the new hotness :)line of pain
https://github.com/shiftcode/dynamo-easy/blob/master/src/decorator/impl/model/model.decorator.ts#L93
NOTE
the
undefined
might be an indicator that this is me; as I think from my quick glance you handle this usecaseAdditional context Add any other context about the problem here.