spring-data-dynamodb icon indicating copy to clipboard operation
spring-data-dynamodb copied to clipboard

.Query annotation does not catch filter expression. It is always EQ.

Open georgiivanov9 opened this issue 1 year ago • 0 comments

Expected Behavior

  @Query(
      fields = "transition_effective_date",
      filterExpression = "#field > :value",
      expressionMappingNames = {@ExpressionAttribute(key = "#field", value = "name")},
      expressionMappingValues = {@ExpressionAttribute(key = ":value", value = "projection")})

This should return all greater than the value, but instead return only the equal one.

Actual Behavior

Return only the equal one.

Steps to Reproduce the Problem

  1. Create a repository
  2. Add some records.
  3. Create a query with filter expression different than "=".

image

Specifications

  • Spring Data DynamoDB Version: 5.2.5
  • Spring Data Version:
  • AWS SDK Version: 2.16.46
  • Java Version: 17
  • Platform Details:

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.

georgiivanov9 avatar May 04 '23 09:05 georgiivanov9