Skip to content
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

Closed
cjkent opened this issue Jul 5, 2017 · 8 comments
Closed

Support immutable classes in DynamoDbMapper #48

cjkent opened this issue Jul 5, 2017 · 8 comments
Labels
2.0 New feature-request A feature should be added or improved.

Comments

@cjkent
Copy link

cjkent commented Jul 5, 2017

DynamoDbMapper requires all mapped classes to be mutable. Immutable domain objects are increasingly the norm in Java, and using DynamoDbMapper means creating mutable duplicates of all domain objects or giving up on the benefits of immutability.

@millems
Copy link
Contributor

millems commented Jul 5, 2017

+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.

@gpolaert
Copy link

gpolaert commented Jul 7, 2017

+1

@cjkent cjkent mentioned this issue Jul 13, 2017
@cjkent
Copy link
Author

cjkent commented Jul 13, 2017

@millems done

@millems
Copy link
Contributor

millems commented Jul 13, 2017

@cjkent Thank you!

@millems
Copy link
Contributor

millems commented Feb 28, 2019

Closing this in favor of #35

@millems millems closed this as completed Feb 28, 2019
@justnance justnance added feature-request A feature should be added or improved. and removed Feature Request labels Apr 19, 2019
@OndraZizka
Copy link

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?

@OndraZizka
Copy link

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.

@bmaizels
Copy link
Contributor

bmaizels commented Sep 9, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0 New feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

6 participants