Minimongo can't do $pull with $in


#1

The following code works server side only:

Stores.update(
    { _id: _id },
    { $pull: { fruits: { $in: [ "apples", "oranges" ] } } },
)

To get around this problem, client side I just used $set on the new array that I want, and server side I did the regular $pull $in. Is there a way to make this work without this hack?


#2

Well I just found out using Kadira that using $pull $in is super slow for some reason. Resetting the entire array is much faster. Don’t know why. Will post a new topic on this.