Last active
June 7, 2021 04:24
-
-
Save proclaim/63c2dedf4d1cf40dc4f5460a7d74c2d2 to your computer and use it in GitHub Desktop.
typeorm delete multiple records
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// assume entityIds is an array | |
connection.createQueryBuilder() | |
.delete() | |
.from(entity) | |
.where('entity.id IN (:...ids)', { ids: entityIds }) | |
.execute() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
that'll do! the code that I'm using will be compiled so it worked on my end