-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Dynamo DB Polymorphism (Feedback Requested) #1229
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
Conversation
This is a useful feature, usage is also simple. When will this be merged? |
@kiiadi Any update on when this might get merged and then released? |
Please merge. |
+1 |
9 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
THE POWER OF THE SWOOSH COMPELS YOU TO MERGE! |
+1 |
1 similar comment
+1 |
Any update on when does this PR gets merge? @kiiadi |
Follow up on completion of this feature? |
Is this set to merge or is there any other problems? |
Hi! Any reason why this hasn't been merged already? It's the only lacking feature I need for my DynamoDB project |
Any update? |
Unfortunately this pull request doesn't have enough tests (either functional or performance) for the Java SDK team to merge as-is, and we haven't prioritized doing that testing, since a lot of people are very vocal about wanting us to focus on V2 of the SDK. I've created a feature request for adding this feature to the V2 DynamoDB enhanced client: aws/aws-sdk-java-v2#1870. We're currently leaning towards just doing this with the enhanced client in V2, since that's much better tested and understood. |
Closing this PR, we don't have plans to merge this DynamoDB Mapper feature at this point. |
In response to issue #832, this introduces a new
@DynamoDBSubTyped
annotation to describe known sub-types of a class along with a string-identifier for those types that is persisted to the Dynamo table and allows the sub-type information to be persisted at save and retrieved at load time.Example usage:
By default the type name is stored in a String field in Dynamo called "_type"; this can be customized by providing the "attributeName" property to the
@DynamoDBSubTyped
annotation. This attribute can refer to an property already on the object or if it doesn't exist as a property of the object it will be created in the dynamo db table. It must be of typejava.lang.String
.The above example allows the following:
Also works with when scanning/querying: