$bit won't do an upsert

XMLWordPrintableJSON

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

      > 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
            Reporter:
            Dwight Merriman
            Votes:
            7 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: