What is the best way to find a recursively embedded document?
I have the following setup:
The group includes many posts. Post recursively inserts many posts.
Given the identifier of a post-embedded object, is there a built-in way to recursively search for this entire tree structure?
My current implementation is essentially a broad first search, but I was curious if mongodb / mongoid has a more efficient implementation.
source share