Delete using Query Builder
Delete
Deleteimport {getConnection} from "typeorm";
await getConnection()
.createQueryBuilder()
.delete()
.from(User)
.where("id = :id", { id: 1 })
.execute();Soft-Delete
Soft-Deleteimport {createConnection} from "typeorm";
import {Entity} from "./entity";
createConnection(/*...*/).then(async connection => {
await connection
.getRepository(Entity)
.createQueryBuilder()
.softDelete()
}).catch(error => console.log(error));Restore-Soft-Delete
Restore-Soft-DeleteLast updated