Support different naming strategies for DynamoDB attributes in enhanced client #5765
Open
1 of 2 tasks
Labels
dynamodb-enhanced
feature-request
A feature should be added or improved.
needs-review
This issue or PR needs review from the team.
p2
This is a standard priority issue
Describe the feature
My understanding is, by default, the enhanced DynamoDb client will assume your attributes are named like your variables which happen to be camel case. If you want your
createdAt
field to be stored with attribute namecreated_at
you either have to use an annotation to overwrite this field individually or use the TableSchema builder to explicitly define all your fields attribute names.I’d prefer something like Jackson where you can set the naming strategy to be camel case, upper camel case, snake case, kebab case, etc.
Use Case
This would be useful as I don’t think there is a standard for attribute name style and the AWS blog / docs are also inconsistent (but consistent within an example), but the sdk forces you into something if you don’t want to write more annotations.
Proposed Solution
The TableSchema.fromClass or fromBean method accepts configuration for what naming strategy to use, similar to configuring Jackson’s ObjectMapper.
Other Information
No response
Acknowledgements
AWS Java SDK version used
Latest
JDK version used
17
Operating System and version
macOS
The text was updated successfully, but these errors were encountered: