Can a MongoDB collection have inside it another collection?
I need to store a recursive tree structure. A linked list. So all the objects are the same. Each has a pointer to a parent object and each has an array of child objects. Can I store such a structure in Mongo. i.e. A Mongo collection of parent objects, each object holds within it a Mongo collection of child objects. $a = $MyCollection->findOne(**some conditions)->Childs->find(...) You cant store collections in collections. But you can store ids that reference objects in other collections. You would have to resolve the id to the document or element and then if that element stores more ids you