Skip to content

Commit

Permalink
Update content/200-orm/500-reference/050-prisma-client-reference.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolasburk authored Nov 27, 2024
1 parent e1bb5d6 commit 7ea728e
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -632,18 +632,11 @@ We introduced `findUniqueOrThrow` in v4.0.0. It replaces the [`rejectOnNotFound`
Here’s an example of how it works:

```ts
await prisma.model.findUniqueOrThrow({
await prisma.user.findUniqueOrThrow({
where: {
id: 1,
},
});
```

:::note

Replace `model` with the name of your Prisma model, e.g., `prisma.user.findUniqueOrThrow` or `prisma.post.findUniqueOrThrow`.

:::

`findUniqueOrThrow` differs from `findUnique()` as follows:

Expand Down

0 comments on commit 7ea728e

Please sign in to comment.