mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
docs: update Soft-Delete, Restore-Soft-Delete examples (#10585)
The getRepository method is missing from the example. Delete the "users" written in the createQueryBuilder method because it is not used in the where method.
This commit is contained in:
parent
7ecc8f3536
commit
4329996086
@ -33,7 +33,8 @@ Examples:
|
||||
|
||||
```typescript
|
||||
await myDataSource
|
||||
.createQueryBuilder('users')
|
||||
.getRepository(User)
|
||||
.createQueryBuilder()
|
||||
.softDelete()
|
||||
.where("id = :id", { id: 1 })
|
||||
.execute();
|
||||
@ -51,7 +52,8 @@ Examples:
|
||||
|
||||
```typescript
|
||||
await myDataSource
|
||||
.createQueryBuilder('users')
|
||||
.getRepository(User)
|
||||
.createQueryBuilder()
|
||||
.restore()
|
||||
.where("id = :id", { id: 1 })
|
||||
.execute();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user