Special handling for findAndModify null return values before 3.0

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • 0.2.0
    • Affects Version/s: 0.2.0
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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:
            Jeremy Mikola
            Reporter:
            Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: