atomic update with $set does not update fields with a null value and there is no obvious error

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: Major - P3
    • 12_01_17
    • Affects Version/s: 1.10.0
    • Component/s: Public API
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      $DB['some_coll'].update(

      { '_id' => 'the_id' }

      ,
      {'$set' => { 'some_field' => 'some_value' }}
      )
      will update correctly most of the time and yield something like:

      {"updatedExisting"=>true, "n"=>1, "lastOp"=>#<BSON::Timestamp:0x00000002d4b438 @seconds=1407952851, @increment=4>, "connectionId"=>5690808, "err"=>nil, "ok"=>1.0}

      but if the value to be updated is null, it returns similarly, but fails to update the value. Deleting the field (from MongoHub) and running the exact same thing will be successful. Loading the doc (.find_one()), and then saving it (.save()) with the updates made in ruby, is also successful.

            Assignee:
            Emily Stolfo (Inactive)
            Reporter:
            Andrew Sheridan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: