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

$bit won't do an upsert

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.5.5
    • Affects Version/s: None
    • Component/s: Write Ops
    • Labels:
      None
    • ALL

      > 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 }

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

              Created:
              Updated:
              Resolved: