The doc should clarify that the resulting documents that are produced with upserts are constructed from both the filter and the update params

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Trivial - P5
    • 4.2
    • Affects Version/s: None
    • Component/s: Docs
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The PyMongo documentation didn't make it clear that a resulting document produced in an upser would be constructed from both the filter and the update parameters passed into the method.

      For comparison, the server doc is pretty clear in that regard:

      If upsert: true and no documents match the filter, db.collection.updateOne() creates a new document based on the filter criteria and update modifications.

            Assignee:
            Julius Park (Inactive)
            Reporter:
            Dmitry Ryabtsev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: