Skip to content

Commit

Permalink
fix: passing conditions from PrimaryKey.update to Table.update
Browse files Browse the repository at this point in the history
Fixes #699
  • Loading branch information
benhutchins committed Jun 5, 2024
1 parent 2f3418d commit 32a6807
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/query/primary-key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,6 @@ export class PrimaryKey<T extends Table, HashKeyType extends PrimaryKeyType, Ran
* It then has the Table.Schema build the DynamoDB.UpdateItemInput with all the requested changes.
*/
public async update(input: PrimaryKeyUpdateItem<T, HashKeyType, RangeKeyType>): Promise<void> {
await this.fromKey(input.hash, input.range).fromJSON(input.changes).save(input.conditions)
await this.fromKey(input.hash, input.range).fromJSON(input.changes).save({ conditions: input.conditions })
}
}

0 comments on commit 32a6807

Please sign in to comment.