I have a table in dynamoDb with a primary hashKey itemId
. Items also have a relationship to a parent item, so besides querying them by its itemId
, I also want to be able to retrieve all the children of a parent, so I added another attribute parentId
.
Now I want to be able to find all the children for a given parent. Reading the docs, I understand that I need to create a secondary index, but I fail to understand what my rangeKey should be and how to construct a DynamoDBQueryExpression<Item>
without setting the range condition.
I am missing something fundamental I guess...