Answer the question
In order to leave comments, you need to log in
Does _id in Mongo Db always have the same number of characters?
Does the _id of a document in mongo always have the same number of characters?
PS
7 troubles one answer, insert the crutch to reinvent the wheel
Answer the question
In order to leave comments, you need to log in
default yes, because it is prescribed as it was said above,
but no one forbids writing your own at least 1, 2, 3, sdfsfsf, sdf34f2343fd , the main thing is to be unique
db.my_database.insert({_id:"this_is_super_unique_id_value", a:1, b:1})
Did you open the documentation ?
Well, no one bothers you to use uuid instead of ObjectId.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question