Recursive entities #418
Unanswered
dmeehan1968
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Can you demonstrate more concretely what you're trying to accomplish? If you're able to accomplish this without Electro what does that look like? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm looking for a solution to creating recursive entities, such as a group that has sub groups.
This can be modelled with attributes for
groupId
andparentGroupId
, with a primary index that just uses groupId as a PK, to allow for direct retrieval of the group regardless of whether it has a parent.It feels like I then need a secondary index with a collection, so that I can retrieve either the group alone, or the group and subgroups. If I was doing this in Dynamo directly, I'd be able to conditionally define the secondary index, but in Electro it seems that although I can either define or not define the secondary, I can't control which composite keys go into it, so it can't be populated with the group itself at the 'root' of the partition.
template
doesn't help as its only pattern matching, i.e. not able to expression conditional logic.Beta Was this translation helpful? Give feedback.
All reactions