Mongoose Nested Arrays, Trees and Embedded Docs Mongoose Nested Arrays, Trees and Embedded Docs mongoose mongoose

Mongoose Nested Arrays, Trees and Embedded Docs


I solved it by implementing schema with array of parents included in children. Does the job for me. Here is the implementation as a module: https://github.com/mariuskubilius/lbg-mongoose-utils/blob/master/lib/ancestorTree.js

It's implemented using this way: http://docs.mongodb.org/manual/tutorial/model-tree-structures-with-ancestors-array/

If you need some clarifications do not hesitate to ask.