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

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

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Gone away
    • 3.4.0
    • None
    • API
    • None

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: