findMany fetching only 1 entity from "includes"
for this query
I get this SQL generated
The issue is that second select has LIMIT 1, so if there are multiple member rows, only first one will get organization relation set. Why is that?
The other issue is it obviously did not use joins.
This is my Prisma settings:
3 Replies
You selected to wait for the human sages. They'll share their wisdom soon.
Grab some tea while you wait, or check out
#ask-ai if you'd like a quick chat with the bot anyway!this is driving me bonkers
Hey!
This issue will be fixed in release happening on next Tuesday
https://github.com/prisma/prisma/issues/27137
Sorry about the inconvenience 🙏
GitHub
Fetching with
include on one-to-one related field only gets first...Bug description Using Prisma v6.7.0 with previewFeatures = ["queryCompiler", "driverAdapters"], one-to-one relationships aren't properly fetched when used in an include. Exa...