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

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: API
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              Sourya Kovvali
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: