Code 10145 LEFT_SUBFIELD only supports Object
Got this error trying to update a field in a mongodb collection. Turns out I was previously using the same field to store object Ids. Now that I’m trying to repurpose the field to store a different datatype, mongo throws an error. Solution was to remove the old field completely from all documents within the collection using the unset command. With no documents having this field, mongo was able to append the new field with the new data type.
No Comments
Comments RSS
TrackBack Identifier URI
No comments. Be the first.
Leave a comment