我需要删除符合特定条件的文件......
服务器/ methods.js
Meteor.methods({
rA: function (a) {
As.remove({aId:a}, {multi:true});
}
});
As
集合包含相同aId
的文档,a
客户端/ JS
var a = this.aId;
Meteor.call('rA', a);
我的终端上出现以下错误:
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)
如何删除多个文档?
谢谢你,新年快乐... ^ _ ^