私は流星のオートフォームを使用しています。次のように、ネストされたスキーマの配列があります。
addresses: {
type: [Schemas.address],
optional: true,
defaultValue: []
}
を使用して配列にアドレスを追加しようとしていますupdate-pushArray
{{> quickForm id="myformid" type="update-pushArray" doc=getDocument collection=getCollection scope="addresses"}}
しかし、私はこれらの宝石を手に入れています:
MinimongoError: Cannot apply $push modifier to non-array
"MongoError: The field 'addresses' must be an array but is of type Object in document {_id: "383EfPJgeZQJFgs72"} [409]"
formToDoc
だから私はそれをフックの配列にラップしようとしました:
SimpleSchema.clean: filtered out value that would have affected key "0", which is not allowed by the schema
だから...ええ。それが私の新鮮なアイデアの限界です。あなたは何を持っていますか?