📌  相关文章
📜  mongoose 不会更新数组中的值 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:13.928000             🧑  作者: Mango

代码示例1
//Maybe notify mongooose the dataset has changed like this :

doc.markModified('pathToYourAttribute') 
//From the docs http://mongoosejs.com/docs/schematypes.html

person.anything = { x: [3, 4, { y: "changed" }] }; 
person.markModified('anything');