-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Hi again!
I currently have the situation where I have a user ID and I want to delete that user from the database. I have the following two questions:
- To delete the user, I need to do the following:
const user = User.get(_id);
user.remove();
This will result in two database queries, right? Is there another way to do it in just one query, f.e. User.remove(_id);?
- When I use
Model.remove(model)
or
Model.prototype.remove()
it only changes the removed flag from false to true. Is there a way to hard delete the user from the database as well?
Thanks in advance!
Best regards,
jinxcifer