Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-58422

Deep find nested objects, almost like a graph db

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      Not sure how feasible this is, but working with relational data in MongoDB is always a pain since finding nested documents requires writing an aggregation using $lookup, $unwind, etc. 

      Just thought of a convenient implementation to solve this. If only ObjectIds included a collection id, then you could call a "deep find" method which fetches all nested objects where it encounters an ObjectId in the return documents. 

      Other considerations here would be infinite loop protection and a max depth feature.

            Assignee:
            edwin.zhou@mongodb.com Edwin Zhou
            Reporter:
            gvw@lowdefy.com Gerrie van Wyk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: