moleculer-db
moleculer-db copied to clipboard
bulk update?
any idea on bulk updating?
this.adapter.updateMany({ parent_id: { [Op.and]: user.id }}, {$set: { is_feature: false }})
this seems to be not working.
Thanks
https://sequelize.org/master/manual/instances.html#working-in-bulk--creating--updating-and-destroying-multiple-rows-at-once-
@olivinesguerra try this => this.adapter.db.models.MODELNAME.update({ field1:'value1' , field2:'value2' },{where:{condition here}})