Reputation: 1011
How can i set an "id"-field in MongoDB-database with autoIncrement. I need unique numeric id. I know, that there's simple method instead of counting items... my application made with nodejs and expressjs framework
Upvotes: 1
Views: 4962
Reputation: 19588
I have used mongoose auto increment plugin of mongoose for doing the same. It is quite helpful. You should have a look and give it a try.
Upvotes: 1