i have one AmazonDynamoDB whose hashKey is: "userId" and rangeKey is: "timestamp".
I am writing one query for fetching up all records related to particular userId.
String keyConditionExpression = "userId = :userId";
HashMap<String, AttributeValue> attributeValuesMap = new HashMap<>();
attributeValuesMap.put(":userId", new AttributeValue().withS("someId"));
DynamoDBQueryExpression<MyTableItem> queryExpression =
new DynamoDBQueryExpression<MyTableItem>()
.withKeyConditionExpression(keyConditionExpression)
.withExpressionAttributeValues(attributeValuesMap)
.withConsistentRead(false);
dynamoDBMapper.queryPage(MyTableItem.class, queryExpression);
this query operation is failing, but not able to see, why it's failing. As given here, this should come under query criteria.
Any help would be really appreciated. Thanks.