I'm trying to add an element to an array of Objects under an Object field
This in my mongoose "Utilisateur" schema:

So what i'm trying to do here is to add an element to the "lien_vers" array this is the code that i wrote
Utilisateur.findOneAndUpdate({ _id: mongoose.Types.ObjectId(auteur._id) },
{
$push: {
'relations.lien_vers': {
metadonnees: { nom_societe: societePersonalId },
identite: auteur._id.toString(),
canons: [""]
}
}
}, { upsert: true }
, function (error, doc) {
if (err) {
console.log("Something wrong when updating data!", err);
}
console.log("updated", doc.relations);
});
i've got no errors but there is no changes ! it seems like the update is not working correctly Any help plz