I want to decrement all documents with order greater then a given value and a given parent value:
var order = 5, parent = "books";
Articles.update({ parent: parent, order > order }, $inc { order: -1 }, {multi: true});
In this example all documents with parent = books and with a higher order value of 5 are updated to an decremented order value. I don't know if this is possible with one line or do I have to start the update() multiple times in a loop?