Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-1776

bsoncxx::oid::to_string() returns decimal string instead of hexadecimal

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.4.0
    • Component/s: API
    • Labels:
      None

      Since I was not sure if this is a bug or if I am missing something I am first filing this under the "question" category.

      I am recording the ObjectId in a string and want to later use it to retrieve the document:
       
       
      auto result = m_collection.insert_one(doc_val.view());
      m_id = result->inserted_id().get_oid().value.to_string();
      However, the to_string method is returning a decimal representation, even though the API documentation says it should return a hexadecimal representation.

            Assignee:
            Unassigned Unassigned
            Reporter:
            puya Puya Daravi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: