Hello, I have a little issue here while trying to delete many documents from many collections. I use:
Collection.remove({filter}, {}, {multi:true}) for like 8 collections. While processing it I get an error from each collection even though all of required documents being removed.
Exception in delivering result of invoking ‘/collection/remove’: TypeError: callback is not a function…
What would be the best way of deleting many documents from many collections at once? all documents are tied up to main _id which I use to filter. I guess new deleteMany() is not yet available in Meteor mongo api wrapper?
I20170120-11:12:48.651(0)? Exception in callback of async function: TypeError: callback is not a function
I20170120-11:12:48.651(0)? at packages/mongo/collection.js:651:5
I20170120-11:12:48.652(0)? at runWithEnvironment (packages/meteor.js:1176:24)
I20170120-11:12:48.653(0)? at packages/meteor.js:1189:14
I20170120-11:12:48.653(0)? at packages/mongo/mongo_driver.js:328:7
I20170120-11:12:48.654(0)? at runWithEnvironment (packages/meteor.js:1176:24)
Thanks!
Edited:
Solved. Error was coming out because {multi:true} is not needed anymore…