An issue where running multiple findUnique
queries with non unique values (extendedWhereUnique
) concurrently on a model with a compound unique constraint will cause prisma to return null instead of the record.
- Only occurs with
findUnique
and when usingextendedWhereUnique
- Only occurs when the model has a
@@unique()
constraint - Only occurs when
findUnique
queries are run concurrently
- Clone this repo.
- Create the
.env
file and add theDATABASE_URL
env var. - Run
yarn
ornpm install
. - Run
yarn prisma migrate dev
ornpm run prisma migrate dev
. - Run
yarn dev
ornpm run dev
.