Internal query batching fails when the table name is 'stores' #20324
Labels
bug/0-unknown
Bug is new, does not have information for reproduction or reproduction could not be confirmed.
kind/bug
A reported bug.
team/client
Issue for team Client.
tech/engines
Issue for tech Engines.
topic: batching
topic: broken query
Milestone
Bug description
I have one of my table named 'stores' in postgres.
When there is a findUnique for stores, the query works fine, and returns the value correctly.
But when there are multiple findUniques for the 'stores' table, and when prisma is internally batching them, client is returning null value for all of the calls.
This happens only when I move to the jsonProtocol supported versions of prisma.
The internal queries seems to be created correctly by prisma though.
SELECT "public"."stores"."id", "public"."stores"."displayName" FROM "public"."stores" WHERE (("public"."stores"."id" = $1 AND "public"."stores"."status" = $2) OR ("public"."stores"."id" = $3 AND "public"."stores"."status" = $4)) OFFSET $5
So I am guessing something is going wrong while mapping them back to the prisma models and returning null
How to reproduce
Expected behavior
No response
Prisma information
// Add your code using Prisma Client
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: