derjust / spring-data-dynamodb

This module deals with enhanced support for a data access layer built on AWS DynamoDB.
https://derjust.github.io/spring-data-dynamodb/
Apache License 2.0
403 stars 141 forks source link

DocumentElement #243

Open dearnani opened 5 years ago

dearnani commented 5 years ago

Expected Behavior

CRUDRepository should update though we save with same primary key Document element content is overwriting

Actual Behavior

Document element content should update

Steps to Reproduce the Problem

  1. Save the data at Document element
  2. Again save with less content on Document element with same partition and sort key
  3. It will over write the content on Document element

Specifications

All those information are logged by org.socialsignin.spring.data.dynamodb.repository.support.DynamoDBRepositoryFactory on INFO level on startup. Or use java -version and mvn dependency:tree | grep -E 'spring|aws' to provide those version numbers.

derjust commented 5 years ago

Please check your DynamoDBMapperConfig? Is something different than DynamoDBMapperConfig.DEFAULT used? The default uses SaveBehavior.UPDATE which is exactly the behavior that is expected.

If possible please post your @Configuration beans related to DynamoDB.