Skip to content

Commit

Permalink
Fix syntax for composite type filters in Prisma documentation examples (
Browse files Browse the repository at this point in the history
#6582)

LGTM 👍 !
  • Loading branch information
ludralph authored Jan 10, 2025
1 parent 35ec7d8 commit 2cc214d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions content/200-orm/500-reference/050-prisma-client-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4837,11 +4837,11 @@ Use `every` to filter for lists of composite types where every item in the list
##### Find the first product where every photo has a `height` of `200`

```ts
const product = prisma.product.findFirst({
const product = await prisma.product.findFirst({
where: {
photos: {
every: {
{ height: 200 },
height: 100,
}
}
},
Expand All @@ -4857,11 +4857,11 @@ Use `some` to filter for lists of composite types where one or more items in the
##### Find the first product where one or more photos have a `url` of `2.jpg`

```ts
const product = prisma.product.findFirst({
const product = await prisma.product.findFirst({
where: {
photos: {
some: {
{ url: "2.jpg" },
url: "2.jpg",
}
}
},
Expand All @@ -4877,16 +4877,15 @@ Use `none` to filter for lists of composite types where no items in the list mat
##### Find the first product where no photos have a `url` of `2.jpg`

```ts
const product = prisma.product.findFirst({
const product = await prisma.product.findFirst({
where: {
photos: {
none: {
{ url: "2.jpg" },
url: "2.jpg",
}
}
},
})

```

## Atomic number operations
Expand Down

0 comments on commit 2cc214d

Please sign in to comment.