How to batch update with meteor


#1

I want to update multi document in client
Messages.update({ _id: { $in: selectedMessages } },{$set:{ state: "outbox"}},{multi: true}, function (e, t) { console.log("e : " + JSON.stringify(e)); console.log("t : " + JSON.stringify(t)); });
this is not working and how to do it ??
thanks for your attention
:relaxed:


#2

You can only update single documents on the client. You have to move that to the server and call it through a Meteor.method.