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

mongoc_collection_save doesn't insert documents with user set id's

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 0.90.0
    • None
    • None
    • Ubuntu 12, Mongo 2.4.8

    Description

      Follow the semantics on http://docs.mongodb.org/manual/reference/method/db.collection.save/

      Save should upsert the document if it already has an id (currently uses MONGOC_UPDATE_NONE instead of MONGOC_UPDATE_UPSERT)

      Also save should replace the document entirely and not $set fields

      I attached an untested version of mongoc_collection_save that I think should work.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mwilkinson Matthew Wilkinson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: