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

Need nested eager loading

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 5.0.0
    • Fix Version/s: 5.1.0, 6.0.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Ruby Sprint 29, Ruby Sprint 30, Ruby Sprint 31

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: