Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support different naming strategies for DynamoDB attributes in enhanced client #5765

Open
1 of 2 tasks
yattoni opened this issue Dec 30, 2024 · 0 comments
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

Comments

@yattoni
Copy link

yattoni commented Dec 30, 2024

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 name created_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

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS Java SDK version used

Latest

JDK version used

17

Operating System and version

macOS

@yattoni yattoni added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Dec 30, 2024
@yattoni yattoni changed the title Support different naming strategies for DynamoDB attributes Support different naming strategies for DynamoDB attributes in enhanced client Dec 30, 2024
@debora-ito debora-ito added dynamodb-enhanced needs-review This issue or PR needs review from the team. p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants