UpdateItemEnhancedRequest for null version number with `ignoreNulls(true)` results into ConditionalCheckFailedException
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 1k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 51
Description
## Describe the issue
When we use `ignoreNulls(true)` feature while doing `table.updateItem` understanding that it will ignore all null fields to update it in db. But it looks like it's not working as expected for dynamo db version field, when my object contain all required fields like primary hash key, and sort key and version number as null, it's throwing `ConditionalCheckFailedException`.
## Steps to Reproduce
Where version number field is declared as below.
```
@Getter(onMethod_ = {@DynamoDbVersionAttribute})
private Long version;
```
```
customDynamoDbBeanObject.version(null);
dynamoDbTable.updateItem(UpdateItemEnhancedRequest.builder(CustomDynamoDbBean.class)
.item(customDynamoDbBeanObject)
.ignoreNulls(true)
.build());
```
## Current Behavior
It's throwing `ConditionalCheckFailedException`.
## Your Environment
* AWS Java SDK version used: AwsJavaSdk-DynamoDb-Enhanced = 2.0;
* JDK version used: JDK8 = 1.0;
* Operating System and version: Linux
Contributor guide
Assessment
This issue has not been assessed yet.