Fix eager loading of nested referenced associations

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: 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
    • None
    • None
    • None
    • None
    • None
    • None

      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 (Inactive)
              Reporter:
              Nazar Matus
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: