aws / aws/aws-sdk-java-v2

read generated value from @DynamoDbAutoGeneratedUuid from AutoGeneratedUuidExtension in case table uses @DynamoDbImmutable

Open
#5,675 1 comment 0 reactions 0 assignees View on GitHub
dynamodb-enhanced feature-request p2
Dominant language
Java
Stars
2.6k
Forks
1k
Avg merge
2d 9h
Merged PRs (30d)
51

Description

### Describe the feature

Currently there is no way how to read generated Uuid in case it was used on partition key attribute in immutable DynamoDb table.
The extension only decorates PutItem operation but since the DB model is immutable we can't get to the actual value used during Put. Calling getItem afterwards makes no sense, since we don't know the partition key of newly created item

### Use Case

It is very typical to use generated UUID as partition key. As of now, this is not possible.

### Proposed Solution

Put request could have a method that would be triggered when all extensions where applied to item or putItem response could contain final version of item that was used during PutItem operation

### Other Information

_No response_

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### AWS Java SDK version used

dynamodb-enhanced-2.28.27.jar

### JDK version used

17

### Operating System and version

macOs 15.0.1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.