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

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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.4.1
    • Write Ops
    • None
    • ALL

    Description

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: