Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-4173

Need nested eager loading

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0, 6.0.0
    • Affects Version/s: 5.0.0
    • Component/s: None
    • None

      Active Record provides nested eager loading like this:

      users = User.includes(:address, friends: [:address, :followers])

      I wonder if Mongoid can support this in the future, since for some specific requirements, a single level eager loading is not enough to optimize the query, and it's not easy to redefine models to circumvent this.

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            chobitscxd@gmail.com Junhui Chen
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: