Open krishmakochhar opened 3 years ago
If your model is like this :
export class Model { @hashKey({attributeName: 'HashKey'}) private _hashKey!: string; @rangeKey({attributeName: 'SortKey'}) private _sortKey!: string;
And if I try to use the executeUpdateExpression method as :
executeUpdateExpression
const itemKey = { HashKey: <some-key>, SortKey: <some-key>, }; await this.mapper.executeUpdateExpression(updateExpression, itemKey, noArgsConstructor);
We get “The provided key element does not match the schema” error. But it works fine if use this instead :
const itemKey = { _hashKey: <some-key>, _sortKey: <some-key>, }; await this.mapper.executeUpdateExpression(updateExpression, itemKey, noArgsConstructor);
If your model is like this :
And if I try to use the
executeUpdateExpression
method as :We get “The provided key element does not match the schema” error. But it works fine if use this instead :