Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3223

$bit won't do an upsert

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 2.5.5
    • None
    • Write Ops
    • None
    • ALL

    Description

      > db.yy.update(

      {z:3}

      ,{$bit:{y:

      {or:new NumberLong(8)}

      }},true)
      > db.yy.find()
      > // nothing

      > db.yy.update(

      {z:3}

      ,{$inc:{y:NumberLong(33)}},true)
      > db.yy.find()

      { "_id" : ObjectId("4defb2c16fb770000bccd32a"), "y" : NumberLong(33), "z" : 3 }

      Attachments

        Activity

          People

            david.storch@mongodb.com David Storch
            dwight@mongodb.com Dwight Merriman
            Votes:
            7 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: