relation-queries-docs
Hi, I'm new, and I think I'm misunderstanding something in the docs, on this page: https://www.prisma.io/docs/orm/prisma-client/queries/relation-queries#filter-a-list-of-relations
It states, "... the following query returns all users and a list of titles of the unpublished posts associated with each user:"
But this does not give me all users, it gives me one user (most recently created maybe?), with only the property "posts", the unpublished posts.
Furthermore, the docs say, "You can also write the same query using include as follows:"
, but this gives me output different from the previous code. It gives me a different user and more properties.
Am I misunderstanding the docs or does this section need rewriting?
1 Reply
Hello @headpie 👋
Thank you for highlighting this. Your observation is correct!
The docs are incorrect here,
findFirst
returns only one record and not all records. I am opening a docs PR to fix this 🙏
This is fixed now! Thank you for reporting 🙌