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

Add support for @AccessType(AccessType.Type.FIELD) #564

Open
ksklodowski-transactionlink opened this issue Apr 9, 2022 · 0 comments
Open

Comments

@ksklodowski-transactionlink

Expected Behavior

I would like to remove setters and getters from entity class and replace them with annotation:
@AccessType(AccessType.Type.FIELD)

Actual Behavior

com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMappingException: Example; no mapping for HASH key

Steps to Reproduce the Problem

  1. Create class with annotations
@DynamoDBTable(tableName = "ExampleTable")
@NoArgsConstructor(access = PRIVATE)
@AllArgsConstructor(access = PRIVATE)
@AccessType(FIELD)
public class Example {

    @DynamoDBHashKey
    private UUID id;
    private UUID taskId;
  
 }
  1. Try to save entity through the repository
@Repository
interface DynamoDbExampleRepository extends CrudRepository<Example, UUID> {

    Optional<Example> findByTaskId(final UUID taskId);

}

Specifications

  • Spring Data DynamoDB Version: 5.2.5
  • Spring Data Version: 2.4.0
  • AWS SDK Version: 1.11.951

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant