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

Eager loading queries associations without results

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Component/s: None
    • Labels:

      Description

      I noticed that eager loading does unnecessary queries if the initial query has no results. The associations should only be queried if there are foreign keys from the initial query result.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: