author User @relation(fields: [userId], references: [id], onDelete: Cascade)
author User @relation(fields: [userId], references: [id])
title String
userId String @db.ObjectId
}
By specifying onDelete: Cascade, Prisma will also delete posts whenever the author of the posts is deleted. There's a lot more to referential actions than cascading deletes. Head over to our documentation to learn more.
Prisma exposes features and workflows that database vendors don't offer.
Prevent referential cycles on MongoDB
As part of getting onDelete and onUpdate ready for MongoDB, we’ve tightened up our validation rules to prevent a potential stack overflow if you create a loop with referential actions.
This change may cause some existing schemas using the mongodb preview feature to become invalid, where your schema now errors out with the following message:
Error parsing attribute "@relation": Reference causes a cycle.
If you run into this, you can learn how to resolve it with this documentation. If you’re still stuck, feel free to open a discussion and we’ll lend a hand!
Deprecating undocumented usage of type in Prisma Schema
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps prisma from 2.30.3 to 3.7.0.
Release notes
Sourced from prisma's releases.
... (truncated)
Commits
a397c78
chore(ci): run tests on multiple operating systems (#10526)1f8e4ef
chore(deps): update engines to 3.7.0-31.8746e055198f517658c08a0c426c7eec87f5a...71bb5fb
chore(deps): update engines to 3.7.0-30.ed54e12a63995c857b35e4f3e720358087e80...21a0146
chore(deps): update studio to v0.445.0 (#10780)05d8abd
chore(deps): update engines to 3.7.0-29.eddf5a169554b90d2150778c2f5f79a0a3c3c...d293b2a
chore(deps): update engines to 3.7.0-27.f4e9ab926e13b5623b5b3af854d738c322973...e10121b
chore(deps): update studio to v0.444.0322c0e3
chore(deps): update engines to 3.7.0-26.432266c87f4558aef2a28b78935ffdf39e936...15b398b
chore(deps): update engines to 3.7.0-25.03133c002635df838c435127ae099886fc6a4...a4940a9
chore: comments from deep dive #7045 (#10732)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)