You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Take a look at the collection identitycounter in your Database. It created by mongoose-plugin-autoinc and may contain an incorrect value for next counter.
So when you add a new record, identitycounter provide next value, eg (100). But in your collection, you already have a record with such id and MongoDB throws an error.
I have a schema with
When I run this I keep getting duplicate index error. Can you tell me where I am wrong ?
The text was updated successfully, but these errors were encountered: