Multiple $pullAll not working

XMLWordPrintableJSON

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

      I am trying to update one document with multiple $pullAll operations but it does not work.

      Here is my query:
      db.users.update({_id: reportedUser},{
      $pullAll:

      {'profile.interactions.sent': [ '24tRsWzr4wKr2rimC', 'gz76RfuYFAxjqhq5j' ]}

      ,
      $pullAll:

      {'profile.interactions.receieved': [ '24tRsWzr4wKr2rimC', 'gz76RfuYFAxjqhq5j' ]}

      ,
      $pullAll:

      {'profile.interactions.previous': [ '24tRsWzr4wKr2rimC', 'gz76RfuYFAxjqhq5j' ] }

      ,
      });

      document before update:
      "profile" : {
      "interactions" :

      { "sent" : [ ], "received" : [ "ztPhuGSBZdZAvMybp", "24tRsWzr4wKr2rimC" ], "previous" : [ ] }

      }

      document after update:
      "profile" : {
      "interactions" :

      { "sent" : [ ], "received" : [ "ztPhuGSBZdZAvMybp", "24tRsWzr4wKr2rimC" ], "previous" : [ ] }

      }

      What it should return:
      "profile" : {
      "interactions" :

      { "sent" : [ ], "received" : [ "ztPhuGSBZdZAvMybp", ], "previous" : [ ] }

      }

      This bug was reproduced in both version 2.6 and 3.0 in node.js and when I do just one $pullAll it works fine.

            Assignee:
            Christian Amor Kvalheim
            Reporter:
            Sukhveer [X]
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: