Skip to content

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

Open
@michalgebauer

Description

@michalgebauer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    dynamodb-enhancedfeature-requestA feature should be added or improved.p2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions