Meteor-Community-Packages / meteor-simple-schema

Meteor integration package for simpl-schema
https://github.com/Meteor-Community-Packages/meteor-simple-schema
MIT License
919 stars 161 forks source link

autoValue: calling fields() and siblingFields() yields no results on insert #719

Closed derwaldgeist closed 6 years ago

derwaldgeist commented 6 years ago

I'm using autoValue in combination with this.siblingFields(), like this:

autoValue(doc) {
      const residences = this.siblingField('residences');
      ...
}

It works perfectly on updates, but on inserts, the fields are always unset and the value is undefined. If I print out the doc that is passed to autoValue, the fields are there, even in the insert case.

aldeed commented 6 years ago

Please post a full schema and full doc that reproduces this issue.

aldeed commented 6 years ago

The Meteor SimpleSchema package is no longer maintained other than critical fixes to keep it running with each latest Meteor release. Closing non-critical issues in this repo. Anyone who cares about this may do one or more of the following: