Meteor Autoform pushArray with nested schema -
i'm using autoform meteor. have array of nested schemas, so:
addresses: { type: [schemas.address], optional: true, defaultvalue: [] }
and i'm attempting add address array using update-pusharray
{{> quickform id="myformid" type="update-pusharray" doc=getdocument collection=getcollection scope="addresses"}}
but i'm getting these gems:
minimongoerror: cannot apply $push modifier non-array "mongoerror: field 'addresses' must array of type object in document {_id: "383efpjgezqjfgs72"} [409]"
so tried wrapping in array in formtodoc
hook:
simpleschema.clean: filtered out value have affected key "0", not allowed schema
so... yeah. that's limit of fresh ideas. have?
it looks there issue update-pusharray type until few days after posted question. according aldeed need running autoform 5.0.2 , meteor 1.0.3.1 or higher work. http://github.com/aldeed/meteor-autoform/issues/788. also, aldeed posted sample might http://autoform.meteor.com/updatepush
Comments
Post a Comment