From 2cc214d301eefd05cecd7ee80110c4b52cfee0fd Mon Sep 17 00:00:00 2001 From: Raphael Etim Date: Fri, 10 Jan 2025 15:20:39 +0100 Subject: [PATCH] Fix syntax for composite type filters in Prisma documentation examples (#6582) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LGTM 👍 ! --- .../500-reference/050-prisma-client-reference.mdx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/content/200-orm/500-reference/050-prisma-client-reference.mdx b/content/200-orm/500-reference/050-prisma-client-reference.mdx index ef6f103ff7..abdd6e7f53 100644 --- a/content/200-orm/500-reference/050-prisma-client-reference.mdx +++ b/content/200-orm/500-reference/050-prisma-client-reference.mdx @@ -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, } } }, @@ -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", } } }, @@ -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