Skip to content
Advertisement

Tag: mongoose

How update and delete bulk operation in mongodb?

I’m building a taskmanagment application, where only admin can delete user. when admin delete a user, I want to assign deleted users task to the his assignby user. when I delete devid user from the db I want to assign his task to the john and save the task Answer I think you are looking for transactions to avoid loss

Populate field then find – mongoose

I have a Cheques and a Payees collection, every cheque has its corresponding Payee ID. What I’m trying to do is to write some queries on cheques, but I need to preform the searching after populating the payee (to get the name) I guess what I’m trying do is fit this somewhere in my code, I have tried to put

Advertisement