$pull is pulling only in last occurence of query,db.getCollection('sid').update({_id:1},{$pull:{array1:"sid"},$pull:{array2:"kp"}})

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Write Ops
    • None
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Pull operation works only on one array even called twice over a document

      Over this document

      { "_id" : 1, "array1" : [ "sid", "yd" ], "array2" : [ "ram", "kp" ] }

      I have run following query

      db.getCollection('sid').update({_id:1},{$pull:

      {array1:"sid"}

      ,$pull:{array2:"kp"}})

      result:

      { "_id" : 1, "array1" : [ "sid", "yd" ], "array2" : [ "ram" ] }

            Assignee:
            Sam Kleinman (Inactive)
            Reporter:
            siddharth jain
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: