Skip to content

DynamoDB Enhanced - out-of-the-box support for custom AttributeConverters and StringConverters to be used in collections. #4862

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

Open
2 tasks
ejnarvala opened this issue Jan 30, 2024 · 0 comments · May be fixed by #6128
Labels
feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.

Comments

@ejnarvala
Copy link

Describe the feature

Out-of-the-box support for custom AttributeConverters and StringConverters to be used in collections (maps, sets, lists)

Use Case

It requires a decent amount of additional code to handle serializing a custom type that is nested within a collection type (set, list, map) as it either requires a converter for the type itself and the type in any specific collection,
or re-implementing similar logic found in the DefaultAttributeConverterProvider, which is not extendable due to not being able to register custom type converters. It would be nice if the default provider would allow registering custom types to it (as well as custom string converters for map keys) so that this additional code is not needed.

Proposed Solution

Making the DefaultAttributeConverterProvider extendable would be one option. This could be done by adding a method to generate a builder from the default instance or exposing the list of all default registered providers so that a new instance can be created with defaults more easily and custom converters added to it. Additionally, the StringConverterProvider should be configurable so that custom key types can be used in maps.

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

2.20.140

JDK version used

17

Operating System and version

MacOS 14.3

@ejnarvala ejnarvala added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
1 participant