-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
Hello, folks!
I'm using recent C++ driver (it's awesome)! But after deep reading of all examples I could not find any way how to add bsoncxx::document::value into existing document.
I'm doing following:
auto db = conn[fastnetmon_global_configuration.mongodb_database_name]; std::string collection_name = "mitigations"; auto doc = bsoncxx::builder::basic::document{}; doc.append(bsoncxx::builder::basic::kvp("active", bsoncxx::types::b_bool{true})); doc.append(bsoncxx::builder::basic::kvp("mitigation_type", "blackhole")); bsoncxx::document::value details = bsoncxx::from_json(json_encoded_flow_spec);
But obvious try to add "details" as sub document failed:
doc.append(bsoncxx::builder::basic::kvp("details", details);
Could you help me? There are no docs in examples folder about adding another document cooked somewhere else.
- related to
-
CXX-860 Fail Combine Multiple Nested Queries with MongoDB C+11 Driver
- Closed