Answer the question
In order to leave comments, you need to log in
Error creating document in Mongodb, after generating _id how to fix?
Hello!
I'm creating a new user! When saving, _id is generated, but for some reason, if the collection is empty, everything is fine, and if there is already a document there, it gives: E11000 duplicate key error index: comandee.users.$user_id_1 dup key: { : null }.
Tell me how to fix!
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