mongoose-increment
mongoose-increment copied to clipboard
Increment to next sequence number even if model is not new
Bug, feature request, or proposal:
proposal
What is the expected behavior?
If the model is not new but auto-incremented field is undefined, create a new field that represents the next incrementation
What is the current behavior?
The incremented field is only created if the model is new
What is the use-case or motivation for changing an existing behavior?
There is no way to easily regenerate to the next sequence number. The use case was related to #4, which required me to generate new sequence number for the duplicates