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

Deep find nested objects, almost like a graph db

    XMLWordPrintable

    Details

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

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: