You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 attribute name:
@Target(TYPE)
@Retention(RUNTIME)
public @interface TableName {
Stringname() default"";
}
This optional annotation when present in the class, takes precedence over the default snake_case name resolver in the DefaultDynamoDbTableNameResolver class.
@DynamoDbBean@TableName(name = "MedicalRecords") // plural or whatever is neededpublicclassMedicalRecord {
// class implementation
}
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:
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: