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

Missleading Exception - update_one()

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Implementation
    • None

      Hey!
      Referring o the commented line ..// << "ended"...
      uncommenting this will lead to the error message in the comment of the same line. The message is not helping.

      bsoncxx::document::value filter_document =
      document { } << "_id" <<
      bsoncxx::oid { strJobID } <<
      finalize;
      
      bsoncxx::document::value update_doc = document{}
      << "$set"
      << open_document
      << "meta" << bsoncxx::types::b_document{mongoMetaData.view()}
      << "ended" << bsoncxx::types::b_bool { bFinishBecauseOnlyFast }
      << close_document
      // << "ended" << bsoncxx::types::b_bool { true }     // mongoc: mongoc_bulk_operation_update_one(): update_one only works with $ operators.
      << "ended" << "true"
      << finalize;
      
      ...update_one(filter_document.view(), update_doc.view());
      

            Assignee:
            david.golden@mongodb.com David Golden
            Reporter:
            Weltenbummler Armin Ball [X]
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: