Hello,
I have a document with an embedded field like this :
{
_id: 1,
email: “email@example.com”,
name: {given: “Jane”, family: “Han”}
}
When I remove the nested field “name” :
db.coll.updateOne({_id:1}, {$unset: {name: 1}})
I receive in the removeField of the changestream only the parent field “name” :
{
"_id" : 1,
"operationType" : "update",
"documentKey" : {
"_id" : 1
},
"updateDescription" : {
"updatedFields" : {},
"removedFields" : [
"name"
]
}
}
Is there any solution to have in the removeFields the whole embedded fields like this, because I want to know which name has been deleted :
{
"_id" : 1,
"operationType" : "update",
"documentKey" : {
"_id" : 1
},
"updateDescription" : {
"updatedFields" : {},
"removedFields" : [
name: {given: “Jane”, family: “Han”}
]
}
}
Thanks for your help !