Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-3038

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

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

      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@mongodb.com Julius Park (Inactive)
            Reporter:
            dmitry.ryabtsev@mongodb.com Dmitry Ryabtsev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: