Mahmoud
06/29/2021, 2:46 PMmodel User {
id String @id
posts Post[]
}
model Post {
id String @id
authorId String
author User @relation(fields: [authorId], onDelete: Cascade, onUpdate: Cascade)
}
The feature can be enabled by setting the preview feature flag referentialActions
in the generator
block of Prisma Client in your Prisma schema file:
generator client {
provider = "prisma-client-js"
previewFeatures = ["referentialActions"]
}
If you run into any questions or have any feedback, we’re available in this issue.
📟 prisma init
now accepts a --datasource-provider
argument
This argument lets you configure the default provider for the initially generated datasource
block in your Prisma schema when using prisma init
to setup a new Prisma project.
⚡️ Node-API improvements (Preview)
Node-API is a new technique for binding Prisma’s Rust-based query engine directly to Prisma Client. This reduces the communication overhead between the Node.js and Rust layers when resolving Prisma Client’s database queries.
You can enable this feature with the nApi
feature flag:
generator client {
provider = "prisma-client-js"
previewFeatures = ["nApi"]
}
Enabling the N-API will not affect your workflows in any way, the experience of using Prisma will remain exactly the same. If you run into any problems, you can reach us in this issue.
📚 Learn more in the release notes
For more info and links to documentation, you can read the release notes.
🌟 Help us spread the word about Prisma 🌟
To help spread the word about Prisma, we’d very much appreciate if you would star the repo 🌟 And if you’re excited about the features in this week’s release, then help us and share your excitement on Twitter.
📰 Join us on Thursday for the “What’s new in Prisma” livestream
@ryan and @Daniel Norman will discuss the latest release and other news from the Prisma ecosystem in a livestream on YouTube on Thursday at 5pm Berlin | 8am San Francisco.
🌎 Prisma Day is happening today and tomorrow!
Join us for two days of talks and workshops by the most exciting members of the Prisma community.
• June 29th (today): Workshops
• June 30th: Talks
Make sure to sign up join the #prismaday channel so you can chat with the speakers 😄
We look forward to seeing you there! 👋