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:
seungwonleee 2024-01-02 18:26:19 +09:00 committed by GitHub
parent 7ecc8f3536
commit 4329996086
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();