Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

update query in mongoose

var conditions = { name: 'bourne' } 
  , update = { $inc: { visits: 1 }}

Model.update(conditions, update, { multi: true }).then(updatedRows=>{
  
}).catch(err=>{
  console.log(err)
  
})
Source by mongoosejs.com #
 
PREVIOUS NEXT
Tagged: #update #query #mongoose
ADD COMMENT
Topic
Name
8+9 =