Skip to main content
Implement automatically increase ids in MongoDB

In MongoDB, every documents have an object id (Bson ID). But sometimes we need ids that can automatically increase when creating a new model. And the id should be an integer starts from 1. How to deal with the problem?


Lazy_VOriginalLess than 1 minuteBackendMongoDBDatabase