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

Insert from update (w/upsert:true) ignores $and equality fields

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

      Example :

      db.truc.update({$or:[{B:1263},{G:1234}]},{$inc:{A:100}},{multi:true,upsert:true});
      
      inserts this document : 
      { "_id" : ObjectId("528cd977e91666571f2af0f1"), "A" : 100 }
      

      Is it a desired behaviour, if yes , is it documented somewhere ?

      Thanks

            Assignee:
            scotthernandez Scott Hernandez (Inactive)
            Reporter:
            chabbey@icare.ch Chabbey François
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: