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

Enumerable.matching_document _unloaded double query fix

    • Type: Icon: Task Task
    • Resolution: Done
    • 3.0.20
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      After debugging MONGOID-2761, I realize that has_and_belongs_to_many were querying the DB twice with the same selector.

      When there was a many to many, and the target was not loaded and target.first was called, _unloaded was calling the db twice in order to load.

            Assignee:
            Unassigned Unassigned
            Reporter:
            arthurnn Arthur Nogueira Neves
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: