new cliqueSchema()
This schema models the Cliques tree using the "Array of Ancestors" method. See here for a detailed explanation of this structure.
It's modeled this way to make it easy to query subtrees with one query. Makes writing slightly more painful but since this collection will be relatively small and infrequently modified, read performance is a much greater concern.
One downside to this approach is obviously the _id as a simple String. Not clear
whether name collision will be an issue but I'm willing to cross that bridge
when I come to it.
- Source: