0
オートフォーム方法アップデートで引数として文書の_idを受信していません:は、私は、このオプションを使用してオートフォームを持っている
{{
#autoForm
collection=articulosColecction
id="articulos_modificar"
doc=articuloToModificar
type="method-update"
meteormethod="areas.update"
singleMethodArgument=true // Recommended here
}}
singleMethodArgument =真
hereを推奨されてそして、私の方法はこれです:
export const update = new ValidatedMethod({
name: 'areas.update',
validate: null,
run(doc) {
console.log(doc._id);
Areas.update({ _id: doc._id }, doc.modifier)
}
});
documentationさんのコメント:
- フォーム属性としてsingleMethodArgument = trueを設定すると、_idおよび修飾子プロパティを持つ単一のオブジェクト引数を使用してメソッドが呼び出されます。 mdg:validated-methodパッケージを使用する場合は、これを行う必要があります。
しかしconsole.log(doc._id);
undefined
を出力していると私は `にconsole.log(DOC)を試みた」とそれが唯一の修飾オブジェクトを出力します。
何が起こっていますか?私のオートフォームに何か問題がありますか?
'autoForm'フォームの' collection'引数に間違ったコレクションがありました。 –