Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mongoose wont update value in array

//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');
 
PREVIOUS NEXT
Tagged: #mongoose #wont #update #array
ADD COMMENT
Topic
Name
8+6 =