私はこのコードを持っています:
Nodes = new Meteor.Collection("nodes");
[...]
Template.list.events({
'click .toggle': function () {
Session.set("selected_machine", this._id);
Nodes.update(Session.get("selected_machine"), {$set: {"conf" :{"flag": true }}});
}
});
meteor にエントリを更新するよう説得できません。DOM にマイクロ秒のフラッシュがありますが、サーバーは更新を拒否します。
これは私のデータです: { "_id" : ObjectId("50d8ec4f5919ffef343c9151"), "conf" : { "flag" : false }, "name" : "sepp" }
console.log(Session.get("selected_machine")); IDを表示します。安全でないパッケージがインストールされています。minimongo コンソールでの手書きの書き込みは期待どおりに機能します。
サブアレイを更新したくないので問題はありますか? 私は何を間違っていますか?ご協力ありがとう御座います