-
-
Notifications
You must be signed in to change notification settings - Fork 312
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
Add support for declaring DynamoDB table names using @TableName annotation #1152
Comments
Hi @MatejNedic, @maciejwalkowiak, @tomazfernandes. Submitting this feature request for evaluation. |
Hey @hardikSinghBehl , Since this is simple wrapper I wouldn't go with personally. Let's see what community thinks. If there is support and need for this lets add it ;) |
Closing as it this feature is going to be part of Spring Data DynamoDB based on AWS sdkv2 |
Hey @MatejNedic, could you provide some links to this project, or how is it related to spring-cloud-aws? Only info I found about it is on some 4 year old repos. |
Hey @Ghilga , Current development is still in Private repo. I have not really done much work in last month have to go back to it. It is too early to give samples since it is still under development it is not a small project. I have to go do the polish, add more tests and finally write the docs so it won't be that soon, since I do this when I get the time in my life after work 😅. But to give you some idea it will allow you to annotate entity and automatically using custom dynamoDbTemplate to get all data you need via 1 query as single table design intends to. Serialisation here is a problem since modelling in Java for DynamoDB is really awkward for single table design. |
Type: Feature
Describe the solution you'd like
Similar to JPA's
@Table
annotation that provides the ability to declare table names in the entity class itself. I propose a similar solution of creating a custom annotation@TableName
with a single attributename
:This optional annotation when present in the class, takes precedence over the default snake_case name resolver in the
DefaultDynamoDbTableNameResolver
class.This feature would provide flexibility for developers to use custom table names when needed while still maintaining the default snake case behaviour for classes without the annotation. Also, no need to create a custom implementation of
DynamoDbTableNameResolver
when using this approach.Additional context
Can submit PR if the feature is approved.
The text was updated successfully, but these errors were encountered: