我有一个仅限客户的收藏
feedComments=new Mongo.Collection('feeds');
使用流星复合我向这个集合发布了一些记录,
当我尝试更新客户端中的集合时
feedComments.update({_id:result._id},{$set:{name:"xxx"}});
它不允许我抛出错误
method not found
为什么我不能插入或更新仅限客户端的集合,为什么客户端集合没有这些方法?
不知道这可以做到,但我也试过这个
feedComments.allow({
insert: function (userId, doc) {
return true;
},
update: function (userId, doc, fields, modifier) {
return false;
},
remove: function (userId, doc) {
return false;
}
});