mongoose-sequence
mongoose-sequence copied to clipboard
Auto-increment has been done in case of document conflict
I have a collection with lets say X auto increment field and which has also compound unique index. So in case of duplication of fields save method returns 409 error, but X field has been incremented. The expected behavior would be to increment X field only when document is saved in the collection.
I think you're right. I have to remember why I chose to use the 'pre' middleware. I'll be back to this, soon
@ramiel any updates to solve this issue?
Same issue
Not really. Can you provide a little reproduction repo?