Is there a way to perform a bulk insert via sails-mongo. So if I pass an array of documents to the model's create method, it will insert each document within that array atomically into the database?
It works exactly like you asked:
Model.create([{foo: "first},{foo:"2nd"}]).exec(...
See http://beta.sailsjs.org/#/documentation/reference/Models/Model-Methods/create.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With