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

scope.find returns document not within scope when identity-map enabled

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

      Here is a failing spec that should pass. It is a regression. The spec describes a particular instance of sending #find to a scope and passing in the ID of a document that is known not to be in that scope. Mongoid should raise in such a case, and did raise in the past, but has regressed and is not currently raising. Instead, Mongoid is returning the document whose ID was passed, even though the document is not in the scope. The failure occurs only when the identity-map is enabled.

      More specifically, the spec passes in v2.2.0 but fails in v2.2.1. The spec continues to fail in v2.2.2 and v2.3.0. git-bisect pinpoints f46252ee46a56045564ec9e5d42b128d56f73b85 as the bad commit.

            Assignee:
            Unassigned Unassigned
            Reporter:
            yfeldblum yfeldblum
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: