We'd love to have an integer autoincrement field within a Mongo Db document / "table", possibly being different from the autogenerated and unique _id index.
The purpose is to provide the users with a unique readable number, auto-incrementing itself, to be used as a reference for the logical entity associated with the database table we are using. The users will refer to that number for example to identify a printed document associated to that entity.
The expected behavior would be to have that number automatically incremented within the database table itself, exactly like it happens in different kinds of databases.
We have implemented our project with the combo: Vue JS - Node - Mongo db. The aim would be to avoid using some JS "trick" to physically increment the number, while having this action done directly in the model of the document.
We couldn't find anything like that in the official documentation, could someone please help us with this? Thanks so much in advance.