[CXX-1776] bsoncxx::oid::to_string() returns decimal string instead of hexadecimal Created: 28/May/19  Updated: 27/Oct/23  Resolved: 28/May/19

Status: Closed
Project: C++ Driver
Component/s: API
Affects Version/s: 3.4.0
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Puya Daravi Assignee: Unassigned
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 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.



 Comments   
Comment by Puya Daravi [ 28/May/19 ]

I'm sorry about the noise I was mistaken. Please close this.

Generated at Wed Feb 07 22:03:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.