Closed jaiminvaja-cue closed 5 years ago
Hey @garnaat @bdonlan @jupiter @trevorrowe @jpeddicord
I really appreciate your work. I am new to TS.
I understand ES6, but don't understand how could I fix the below error. I hope it would be easy to share solution.
(node:9249) UnhandledPromiseRejectionWarning: ValidationException: The provided key element does not match the schema``` This is my ES6 JS file.
import { DynamoDbSchema, DynamoDbTable, } from '@aws/dynamodb-data-mapper'; class MovieModel { constructor(year, title) { this.year = year; this.title = title; } } Object.defineProperties(MovieModel.prototype, { [DynamoDbTable]: { value: 'Movies' }, [DynamoDbSchema]: { value: { year: { type: 'Number', keyType: 'HASH' }, title: { title: 'String' } }, }, }); export default MovieModel;
Your guidance will be highly appreciated and valuable to me. Regards,
Review the below link to get solution: https://github.com/awslabs/dynamodb-data-mapper-js/tree/master/packages/dynamodb-data-marshaller
Hey @garnaat @bdonlan @jupiter @trevorrowe @jpeddicord
I really appreciate your work. I am new to TS.
I understand ES6, but don't understand how could I fix the below error. I hope it would be easy to share solution.
Your guidance will be highly appreciated and valuable to me. Regards,