class_docstr: Calls to :meth:`orion.core.io.database.AbstractDB.write`.
docstr: Query using ``_id`` key.
docstr_tok: ["Query","using","``","_id","``","key","."]
code: def test_update_with_id(self, orion_db, test_collection):
      """Query using ``_id`` key."""
      filt = {"_id": test_collection[1]["_id"]}
      count_before = orion_db.count("test_collection")
      # call interface
      assert (
          orion_db.write(
              "test_collection", {"same_field": "diff"}, filt
          )
          == 1
      )
      database = get_db(orion_db)
      assert orion_db.count("test_collection") == count_before
      value = list(database["test_collection"].find())
      assert value[0]["same_field"] == "same"
      assert value[1]["same_field"] == "diff"
      assert value[2]["same_field"] == "same"
  
imports: import pickle
  from datetime import datetime
  import pytest
  from orion.core.io.database import Database, DatabaseError, DuplicateKeyError
  from orion.core.io.database.ephemeraldb import EphemeralDB
  from orion.core.io.database.mongodb import MongoDB
  from orion.core.io.database.pickleddb import PickledDB
  from .conftest import insert_test_collection
label_desc: Use image node_id 4 for calling the TestWrite obj's underlying member method code with example usage: obj.test_update_with_id(orion_db, test_collection) without return types