Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Here is how you can quickly delete an entire table. Is this a bug or a feature? #6620

Closed
anton-bot opened this issue Aug 26, 2020 · 1 comment

Comments

@anton-bot
Copy link

anton-bot commented Aug 26, 2020

(typeorm 0.2.18)

When you want to count or select something, here is how you do it:

manager.count(Entity, {
  where: {
    value: In(values),
  }
});

When you want to delete something:

this works fine -

manager.delete(Entity, {
    value: In(values),
});

this type-checks, but deletes the entire table:

manager.delete(Entity, {
    where: {
        value: In(values),
    }
});

Is this a bug in the types or a feature?

@anton-bot anton-bot changed the title Here is how you can quickly and unintentionally delete an entire table. Is this a bug or a feature? Here is how you can quickly delete an entire table. Is this a bug or a feature? Aug 26, 2020
@imnotjames
Copy link
Contributor

Duplicate of #3416

@imnotjames imnotjames marked this as a duplicate of #3416 Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants