Updating data type to an Object in mongoDB
问题 I have changed one of the fields of my collection in mongoDB from an array of strings to an array of object containing 2 strings. New documents get inserted without any problem, but when a get method is called to get , querying all the documents I get this error: Failed to decode 'Students'. Decoding 'photoAddresses' errored with: readStartDocument can only be called when CurrentBSONType is DOCUMENT, not when CurrentBSONType is STRING. photoAddresses is the field that was changed in Students.