docs: update find-options (#10877)

This commit is contained in:
Mykola Kryshchuk 2025-01-05 22:45:28 +02:00 committed by GitHub
parent 43e3a07e1e
commit c27e4e83b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -588,7 +588,7 @@ If you need to provide user input that is an array, you can bind them as a list
```ts
import { Raw } from "typeorm"
const loadedPosts = await dataSource.getRepository(Post).findby({
const loadedPosts = await dataSource.getRepository(Post).findBy({
title: Raw((alias) => `${alias} IN (:...titles)`, {
titles: [
"Go To Statement Considered Harmful",
@ -601,7 +601,7 @@ const loadedPosts = await dataSource.getRepository(Post).findby({
will execute following query:
```sql
SELECT * FROM "post" WHERE "titles" IN ('Go To Statement Considered Harmful', 'Structured Programming')
SELECT * FROM "post" WHERE "title" IN ('Go To Statement Considered Harmful', 'Structured Programming')
```
## Combining Advanced Options
@ -655,4 +655,4 @@ will execute following query:
```sql
SELECT * FROM "post" WHERE NOT("title" = 'About #2') AND "title" ILIKE '%About%'
```
```