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

Allow filter by ObjectId for `update_one()` and other methods

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: API
    • None

      Regarding the filter for methods like `update_one()`, etc, allow users to directly use `ObjectId()` as filter

       

      Usually it is used like:

      db.collection.update_one({'_id': ObjectId('6ef...d32')}, ...) 

       

      Proposed: To allow API usage like this:

      db.collection.update_one(ObjectId('6ef...d32'), ...)

      Also, the method `find_one()` allows for this style
      collection.py

            Assignee:
            Unassigned Unassigned
            Reporter:
            souryavarenya@gmail.com Sourya Kovvali
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: