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

Fix eager loading of nested referenced associations

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 8.0.1
    • Affects Version/s: 7.0.2
    • Component/s: Query
    • Environment:
      Linux (Solus), Ruby 2.5.1, Rails 5.2.2, mongo (ruby driver) 2.6.4
    • Minor Change

      On versions < 7 I used this gem: https://github.com/ElMassimo/mongoid_includes which is doing its job quite good, but unfortunately is not compatible with version >=7.

      But I believe that I came up using that gem because of the same issue - it looked like nested eager loadings were still ending up with N+1's.

      So here's a minimalistic example gist to demonstrate this issue:
      https://gist.github.com/FunkyloverOne/2024bb96c3db8be301a8d10e1abd7968

            Assignee:
            neil.shweky@mongodb.com Neil Shweky (Inactive)
            Reporter:
            NazarMatus Nazar Matus
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: