How can I change an objects id? It doesn’t seem to be just a regular attribute, so I’m not sure if I’m able to update that value?
I’m using Ruby with Mongoid, but I can’t figure out how using just the ruby driver, any help would be appreciated!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
MongoDB won’t let you update the
_idfield of a document, but you can delete the document and reinsert it with a new_idvalue.