How to handle if document structure after production changes.
Suppose I had 500 documents like this:
{
name: ‘n1’
height: ‘h1’
}
Later if I decide to add all the documents in below format:
{
name: ‘n501’
height: ‘h501’
weight: ‘w501’
}
I am using cursor.All(&userDetails)
to decode(deserialize) in Go to get the output of the query in struct userDetails
. If I modify the structure of further documents and userDetails
accordingly, it will fail for the first 500 documents?
How to handle this change?