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
Allow custom DynamoDB mapper with AttributeTransformer #91
Comments
DynamoDBMapper solves derjust#91
Closed as merged |
Is there a chance we can get this ported to the 4.5.x line and a 4.5.1 released? We are on Spring Boot 1.5.9, and therefore have to use 4.5.0 at the moment. I am in need of using Thank you! |
@gauravbrills yes this is part of the |
Yes found it thanks |
v.4.5.1 is right now publishing to Maven Central |
@derjust when running the same get the below error I guess cause of the assert for the dynamoDbMapper , do we need the assert if we supplying the dynamodb mapper with the new constructor provided ?
|
For now created a custom Dynamodbtemplate to solve this and passing it as a dynamodboperationRef .. had to make the following changes to skip the assert check in DynamoDbTemplate
do review this , I guess it needs to be changed or will do a PR . For now have created a custom DybamoDbTemplate with the above code to fix the same |
#105 cherry-picked & added unit tests (and fixed a typo) 👍
Thanks & happy holidays 🎄 @gauravbrills |
Great..Happy holidays 🎄 to you too @derjust 😊 |
In my case I need both Dynamo Table prefix like (DEV_, QA_, etc) and encrypt all data in DynamoDB. I think below constructor should be public as well? I may be wrong. DynamoDBTemplate(AmazonDynamoDB amazonDynamoDB, DynamoDBMapperConfig dynamoDBMapperConfig, DynamoDBMapper dynamoDBMapper) |
In my use-case I need to encrypt all data in DynamoDB. Fortunately there's a ready-to-use tool from AWS that implements encryption using an AttributeTransformer.
A DynamoDBMapper can be constructed with an AttributeTransformer that is used then. Since spring-data-dynamodb can use a user-provided DynamoDBTemplate it'spossible to inject it at this point.
The problem is that DynamoDBTemplate has no way to set DynamoDBTemplate programmatically nor has it a way to pass an AttributeTransformer. I "fix" this by using reflection but that's not how it should work.
The text was updated successfully, but these errors were encountered: