Skip to content

Commit

Permalink
fix(prisma-client-reference): createMany() brackets and wording (#5728)
Browse files Browse the repository at this point in the history
Co-authored-by: Jon Harrell <[email protected]>
  • Loading branch information
janpio and jharrell authored Apr 2, 2024
1 parent 3f4562c commit 4b99e7b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions content/200-orm/500-reference/050-prisma-client-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ const deleteUser = await prisma.user.delete({

### <inlinecode>createMany()</inlinecode>

`createMany` creates multiple records in a transaction.
`createMany()` creates multiple records in a transaction.

#### Options

Expand All @@ -1231,10 +1231,10 @@ const deleteUser = await prisma.user.delete({

#### Remarks

- As of Prisma ORM version 5.12.0, `createMany` is now supported by SQLite.
- As of Prisma ORM version 5.12.0, `createMany()` is now supported by SQLite.
- The `skipDuplicates` option is not supported by MongoDB, SQLServer, or SQLite.
- 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

Expand Down Expand Up @@ -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`.
Expand Down

0 comments on commit 4b99e7b

Please sign in to comment.