1回答
- 新しい順
- 投票が多い順
- コメントが多い順
1
You cannot update values of an item using a read api such as Query
. You must use UpdateItem
:
https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html
関連するコンテンツ
- AWS公式更新しました 2年前
- AWS公式更新しました 9ヶ月前
You cannot update values of an item using a read api such as Query
. You must use UpdateItem
:
https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html
Hi @Leeroy Hannigan, Thanks for the suggestion I changed the logic to update a item in dynamoDB which helped me to solve the problem Initially I used : employeeTable.updateItem(Employeeitem) Note : *EmployeeItem = the modelled item to be inserted into or updated in the database table.
Updated logic: I updated the logic to use updateItem(UpdateItemEnhancedRequest<T> request) with UpdateQuery
UpdateItemEnhancedRequest<Employee> request = UpdateItemEnhancedRequest .builder(Employee.class) .item(employee) .ignoreNulls(true) -> this actually helped me avoid overriding the existing data with null values in update query .build();
Thanks for you help and pointing to me correct documentation