-
Notifications
You must be signed in to change notification settings - Fork 856
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 immutable classes in DynamoDbMapper #48
Comments
+1 Do you mind migrating this suggestion to our dynamo DB mapper refactor issue? #35 We haven't really changed the mapper yet for V2, but we intend to. Suggestions like these give us a good new-feature foundation when we take on that task. |
+1 |
@millems done |
@cjkent Thank you! |
Closing this in favor of #35 |
Is there any chance that DynamoDbMapper could get this feature back in SDK 1.x? It's not that big change, just use constructor instead of a setter. If I coded it, could that get in? |
I have one more idea. I need this for Kotlin's data classes. And actually, I could add the setters, which would call copy(), but the unmapper would then have to replace the reference of the object with what it would receive from the setter call. That would be even easier implementation. |
Hi @OndraZizka , thanks for your suggestions and feedback. At this time we're not considering any significant feature requests for the DynamoDBMapper in the v1 SDK (even customer submitted PRs, as there is still a cost and risk associated with these for us). We would encourage customers to upgrade to the enhanced client in the v2 SDK if it is possible for them to do so as that is where we want to focus our resources and energy. |
DynamoDbMapper
requires all mapped classes to be mutable. Immutable domain objects are increasingly the norm in Java, and usingDynamoDbMapper
means creating mutable duplicates of all domain objects or giving up on the benefits of immutability.The text was updated successfully, but these errors were encountered: