Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-95

Special handling for findAndModify null return values before 3.0

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.2.0
    • Affects Version/s: 0.2.0
    • Component/s: None
    • None

      While implementing the "FindOneAndUpdate when no documents match with upsert returning the document before modification" test case for PHPLIB, I came across an inconsistency among server versions. This also applies to the corresponding FindOneAndReplace test

      The findAndModify command returns an empty BSON document on 2.4 and 2.6, while null is returned on 3.0. I couldn't find a specific SERVER ticket to cross-reference here, but I know this was the result of some refactoring (possibly related to SERVER-17372). Solving this will likely require manual inspection of lastErrorObject.updatedExisting.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: