MCQs > IT & Programming > MongoDB > One of the documents in your collection has an _id based upon an older database design and you want to change it. You write an update command to find the document and replace the _id but the _id isn't changed. How should you fix the issue?

MongoDB MCQs

One of the documents in your collection has an _id based upon an older database design and you want to change it. You write an update command to find the document and replace the _id but the _id isn't changed. How should you fix the issue?

Answer

Correct Answer: You can't. Once set, the _id field cannot be changed.

Explanation:

Note: This Question is unanswered, help us to find answer for this one

MongoDB Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

MongoDB Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it