I am new to DynamoDB and wanted to know how can we query on a table in DynamoDB with the hashKey and sortKey.
I have a table named Items. It`s schema is
1. Product (Partition Key of type String)
2. ID (Sort Key of type int)
3. Date ( attribute of type String)
My query for getting all items having product = 10 is
Items it = new Items();
it.setProduct("apple");
DynamoDBQueryExpression<Items> queryExpression = new DynamoDBQueryExpression<Items>()
.withHashKeyValues(it);
List<Items> itemList = mapper.query(Items.class, queryExpression);
But, now I want to get all items having Product = "apple" and ID = 100.
I can I write a query in Java for DynamoDB .
