Answer the question
In order to leave comments, you need to log in
How to make unique document number in MongoDB?
Hello! I'm slowly learning MongoDB. Everything seems to work out, but I can’t figure out how to implement a unique document number. It's like an id, but in addition to the id, I need a unique human-readable number (1,2,3 ..)
Ideas in the form of bicycles come to my mind, but I did not find any ready-made solutions. There are solutions on the Internet where the standard MongoDB id turns into a number. But that doesn't suit me. I need a separate id, a separate number.
I would be grateful for any constructive! Thank you)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question