From 1ecf4a659156866f8b1ac56b721290b7bc8af02f Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Fri, 15 Mar 2024 21:21:05 +0100 Subject: [PATCH] fix(prisma-client-reference): createMany() brackets and wording --- .../500-reference/050-prisma-client-reference.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 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 f8b429bb2a..b452aa1596 100644 --- a/content/200-orm/500-reference/050-prisma-client-reference.mdx +++ b/content/200-orm/500-reference/050-prisma-client-reference.mdx @@ -1214,7 +1214,7 @@ const deleteUser = await prisma.user.delete({ ### createMany() -`createMany` creates multiple records in a transaction. +`createMany()` creates multiple records in a transaction. #### Options @@ -1231,10 +1231,10 @@ const deleteUser = await prisma.user.delete({ #### Remarks -- `createMany` is not supported by SQLite. +- `createMany()` is not supported by SQLite. - The `skipDuplicates` option is not supported by MongoDB and SQLServer. -- You **cannot** create or connect relations - you cannot nest `create`, `createMany`, `connect`, `connectOrCreate` inside a top-level `createMany` -- You can nest a [`createMany`](#createmany-1) inside an `update` or `create` query - for example, add a `User` and two `Post` records at the same time. +- You **cannot** create or connect relations by using nested `create`, `createMany`, `connect`, `connectOrCreate` queries inside a top-level `createMany()` query. +- You can use a nested a [`createMany`](#createmany-1) query inside an [`update()`](#update) or [`create()`](#create) query - for example, add a `User` and two `Post` records with a nested `createMany` at the same time. #### Examples @@ -2774,7 +2774,7 @@ A nested `createMany` query adds a new set of records to a parent record. See: [ #### Remarks -- `createMany` is available as a nested query when you `create` (`prisma.user.create(...)`) a new parent record or `update` (`prisma.user.update(...)`) an existing parent record. +- `createMany` is available as a nested query when you `create()` (`prisma.user.create(...)`) a new parent record or `update()` (`prisma.user.update(...)`) an existing parent record. - Available in the context of a one-to-many relation — for example, you can `prisma.user.create(...)` a user and use a nested `createMany` to create multiple posts (posts have one user). - **Not** available in the context of a many-to-many relation — for example, you **cannot** `prisma.post.create(...)` a post and use a nested `createMany` to create categories (many posts have many categories). - Does not support nesting additional relations — you cannot nest an additional `create` or `createMany`.