Reputation:
I need to remove documents which meet certain criteria...
server/methods.js
Meteor.methods({
rA: function (a) {
As.remove({aId:a}, {multi:true});
}
});
As
collection has documents with the same aId
, it is a
client/js
var a = this.aId;
Meteor.call('rA', a);
I got following error on my terminal:
I20151231-06:39:24.849(7)? Exception in Mongo write: TypeError: object is not a function
I20151231-06:39:24.850(7)? at packages/mongo/mongo_driver.js:322:1
I20151231-06:39:24.851(7)? at runWithEnvironment (packages/meteor/dynamics_nodejs.js:110:1)
How do I remove multiple documents?
Thank you and happy new year... ^_^
Upvotes: 0
Views: 120