You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.
I am having issues with creating secondary index. This is how my Entity class looks like
import { attribute, rangeKey, table, hashKey} from '@aws/dynamodb-data-mapper-annotations';
@table('Comments')
export class Comment{
@hashkey({indexKeyConfigurations: { commentRefId: 'HASH' } })
commentRefId: string;
@rangeKey({ defaultProvider: () => new Date() })
createdOn: Date;
@Attribute()
data?: string;
@Attribute()
author: string;
@Attribute()
authorId: number;
@Attribute()
uuid: string;
}
create table code
this.dynamoDB.mapper.ensureTableExists(Comment, {
readCapacityUnits: 5,
writeCapacityUnits: 5}
When I run this code, it returns error saying
(node:33860) UnhandledPromiseRejectionWarning: Error: No options provided for commentRefId index
The text was updated successfully, but these errors were encountered: