Skip to content

Hard Delete #21

@jinxcifer

Description

@jinxcifer

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:

  1. 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);?

  1. 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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions