AutoForm is a Meteor package that adds UI components and helpers to easily create basic forms with automatic insert and update events, and automatic reactive validation.
MIT License
1.44k
stars
328
forks
source link
update-pushArray + schema.extend() is broken. #1690
have quickForm / autoForm instances of update-pushArray that have worked fine until recent updates to current package versions. Now, with a base schema that is extended on the 'tests.$.scores' object, I get
The type for "scores" is set to a SimpleSchema instance that defines "scores.CFC", but the parent SimpleSchema instance also tries to define "scores.CFC"
The parent schema doesn't define scores at all, much less the individual score instances.
is just one form of syntax I've used to extend the schemas, various methods worked, but all of them threw the same errors in an update-pushArray scoped to "tests".
For the sake of testing, I put together a new schema that is a combo of StudentsBaseSchema with the contents of AlaScoresSchema copy/pasted into it. No errors with that, so I guess that's my workaround. Have a ton of repetition in my schemas so as to have full, non-extended schemas for any that need to be used in a update-pushArray form.
This is rather a SimpleSchema issue. I will close due to silence. This may also have been resolved with AutoForm 7.0.0, please migrate to the latest version and reopen in case the issue persist
have quickForm / autoForm instances of update-pushArray that have worked fine until recent updates to current package versions. Now, with a base schema that is extended on the 'tests.$.scores' object, I get
The type for "scores" is set to a SimpleSchema instance that defines "scores.CFC", but the parent SimpleSchema instance also tries to define "scores.CFC"
The parent schema doesn't define scores at all, much less the individual score instances.
is just one form of syntax I've used to extend the schemas, various methods worked, but all of them threw the same errors in an update-pushArray scoped to "tests".
For the sake of testing, I put together a new schema that is a combo of StudentsBaseSchema with the contents of AlaScoresSchema copy/pasted into it. No errors with that, so I guess that's my workaround. Have a ton of repetition in my schemas so as to have full, non-extended schemas for any that need to be used in a update-pushArray form.