Closed cayuu closed 8 years ago
Yep - and see #13 Add custom routes comment on how Sequelize does this
There are two ordering issues for self-referencing generate
considerations.
format(model, data)
creates a modified data^
based on an ordered sequence of changes: a. Defaults, b. Generators, c. Transforms.. etc. It is essential to document 📖 that this
references in Generators will be acting on the post-defaults-set data.The gun is loaded. Generator fns have unfettered access to fields via this
😵 🔫
Custom transform functions now also have access to model fields via this 💥 🎉 👻
It can be useful to reference another value on the object itself. This may or may not be technically feasible/practical, but sometimes you might want to do something like:
Or even something like: