Prisma crashes when I use the same table for counting and findUnique
#7893
Labels
bug/2-confirmed
Bug has been reproduced and confirmed.
kind/bug
A reported bug.
team/client
Issue for team Client.
topic: postgresql
topic: selectRelationCount
Milestone
Bug description
When I try to count followers of a
User
model, which itself is an array of users, like this:I get this error:
How to reproduce
.env
:Go to github.com > Settings > Developer > OAuth Apps and save
GITHUB_ID
andGITHUB_SECRET
to an .env fileRun
# db startup pnpm generate pnpm dev
/api/auth/signin
. Sign In with GitHub./your-github-nickname
. Nickname is a slug so spaces are converted to dashes.Expected behavior
I would expect it to not crash and return the followers count
Prisma information
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: