Open ivyblossom opened 5 years ago
Seems like this is the solution to my issue: https://www.hellojava.com/a/67524.html which is really from https://stackoverflow.com/questions/55150630/aws-dynamodbmapper-save-method-keeps-throwing-dynamodbmappingexception-not-sup
This has a side effect of persisting the composite key into another field of the table:
“id”: “{\“journalId\“:\“91604760023\“,\“evaluationSequence\“:1}“
. Redundant data but doesn’t really do any harm.
Expected Behavior
The API should be able to persist an ArrayList that is nested within another entity when the wrapper class for this ArrayList has been annotated with
@DynamoDBTypeConverted
.Actual Behavior
A runtime exception is thrown with this message:
not supported; requires @DynamoDBTyped or @DynamoDBTypeConverted
Steps to Reproduce the Problem
// Other fields that will be annotated with @DynamoDBAttribute
// Getter and setter methods of other fields annotated with @DynamoDBAttribute
}
Repository Interface:
In the Domain class, there is one attribute like this:
This attribute is defined in another class which has a field with the
@DynamoDBTypeConverted
This is the Converter class:
There's another attribute that is defined in another class which has a field with the
@DynamoDBTypeConverted
. That gets converted on save and unconverted on retrieve with no issues. Its Converter class is similar to the one I provided above. However for theImpactEvaluationsList
, only theunconvert
works, theconvert
seems to not be called at all during save.Specifications
All those information are logged by
org.socialsignin.spring.data.dynamodb.repository.support.DynamoDBRepositoryFactory
onINFO
level on startup. Or usejava -version
andmvn dependency:tree | grep -E 'spring|aws'
to provide those version numbers.