🌟 Help us spread the word about Prisma by starring the repo or posting on X about the release. 🌟
Highlights
Happy New Year from your friends at Prisma! 🎊
In the last 4 weeks, we resolved some bugs on the ORM and made some progress on some exciting features that we’re not yet ready to announce. Stay tuned for the upcoming releases, in which we’ll be announcing new features. 😉
relationJoins
improvements: Relation loading strategy per query (Preview)
In version 5.7.0, we released relationJoins
into Preview. The relationJoins
feature enables support for JOIN
s for relation queries.
This release adds support for the ability to specify the strategy used to fetch relational data per query when the Preview feature is enabled. This will enable you to choose the most efficient strategy for fetching relation data depending on your use case.
You can now load relation data using either of the following strategies:
join
— usesJOIN
s to fetch relation dataquery
— uses separate queries to fetch relation data
When the relationJoins
Preview feature is enabled, by default, the relation fetching strategy used is join
. You can override the default behavior by using the relationLoadStrategy
query option.
To get started, enable the Preview feature:
// schema.prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["relationJoins"]
}
… and specify the relation loading strategy for your query as follows:
await prisma.user.findMany({
relationLoadStrategy: 'query',
include: {
posts: true,
},
})
Try it out and share your feedback and create a bug report if you encounter any issues.
Survey: Edge functions support
We’re working on bringing Edge function support to Prisma ORM and we would appreciate your input by submitting a response to our survey. By filling out the survey, you will be considered for our Early Access cohort as soon as we have something for you to try out.
Fixes and improvements
Prisma Client
- Log output of Node-API library engine is different
target
andtimestamp
are undefined ininfo
events in Data Proxy client- Wrong types of
timestamp
andduration
in query events with Data Proxy - Using
citext
fields with neon database driver causes conversion error - Add FreeBSD 14 as a new platform
- PostgresError { code: "54023", message: "cannot pass more than 100 arguments to a function", severity: "ERROR", detail: None, column: None, hint: None }
- Int[] return as null
Prisma Migrate
Language tools (e.g. VS Code)
- Add quickfix for
Error validating field 'id' in model 'Post': MongoDB '@default(auto())' fields must have 'ObjectId' native type.
- Append mention of update to "preview feature not known" error message
Credits
Huge thanks to @anuraaga, @onichandame, @LucianBuzzo, @RobertCraigie, @fqazi, @KhooHaoYit, @alencardc, @Oreilles, @tinola, @AikoRamalho, @luxaritas for helping!
Company news
🎉 A billion queries and counting: Prisma Accelerate
Prisma Accelerate, our global database cache has served over 1 billion queries since its General Availability launch.
We’d like to give a shoutout to our team and everyone who’s been with us on this journey. Stay tuned for some exciting products and features in the pipeline for 2024!
🔮 Prisma ORM Ecosystem
Are you building a cool tool, extension, generator, CLI tool or anything else, for Prisma ORM? Let us know.
We would like to learn about it and feature it on our Ecosystem page.
💼 We’re hiring
If you're interested in joining our growing team to help empower developers to build data-intensive applications, Prisma is the place for you. Check out our Careers page for open positions.