mongoose-plugin-autoinc icon indicating copy to clipboard operation
mongoose-plugin-autoinc copied to clipboard

fix bug: no supporting model validation

Open bigdong89 opened this issue 6 years ago • 3 comments

fix bug: not support model validation when using this plugin

bigdong89 avatar Jun 14 '18 09:06 bigdong89

Why do you want use post hook, not pre hook as now is?

Anyway i will not accept your PR with your changes in package.json file. Please explain your changes with your use case (example) and revert changes in package.json.

Thanks.

nodkz avatar Jun 14 '18 15:06 nodkz

  1. For my application, I modified package info. So you have to change it back. Or someone would make another pull request.
  2. why not "pre('validate')" but "post('validate')" 2.1 "pre('validate')" make validation funciton fail but "post('validate') can make it work. 2.2 "pre('validate')" will waste many sequence IDs if validation fails.

bigdong89 avatar Jun 15 '18 10:06 bigdong89

I failed to fork it again to make new pull request because github only allows me to fork once. Can't delete my previous fork either because my own application needs it.

Sorry, there must be other guys who fork it and help me make this merge request.

bigdong89 avatar Jun 15 '18 10:06 bigdong89