Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-1060

Bulk write updates require $set, but regular updates do not

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.3.1
    • None
    • None
    • None

    Description

      mongoc_bulk_operation_update (bulk, BCON_NEW ("a", BCON_INT32 (1)), BCON_NEW ("a", BCON_INT32 (2)), false);
       
      mongoc_bulk_operation_execute (bulk, &reply, &error);
      

      produces the error

      WARNING:       mongoc: mongoc_bulk_operation_update(): update only works with $ operators.
      Error: Cannot do an empty bulk write
      

      However, mongoc_collection_update allows updating without $set.

      Attachments

        Activity

          People

            bjori Hannes Magnusson
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: