Stefan Stoichev
  • Home
Sign in Subscribe

set

A collection of 1 post
mongodb

MongoDB bulk update and insert

Just a note to myself (kinda) how to perform bulk update in MongoDB. (it took me some time to figure it out) // OrderId = [1,2,3,4,5,6] BulkUpdate(OrderId, function() { console.log('done'); }); function BulkUpdate(OrderId, callback) { Model.update( { orderid : { $in: OrderId } }, { $set: { status: 'complete&
Sep 15, 2014
Page 1 of 1
Stefan Stoichev © 2025
Powered by Ghost