This repository was archived by the owner on Apr 15, 2025. It is now read-only.

Description
Problem
When supplying parameters for unique queries like update or find_unique, I cannot supply additional/redundant constraints other than the unique constraints.
Suggested solution
The JS Prisma Client solved this with the extendedWhereUnique preview feature, which was stabilized in version 5.0.0. I can't seem to get this behavior with Prisma Client Python.
Alternatives
Just not using extended unique queries. This leads to bad usability and/or unnecessary database queries.
Additional context
This is useful for example when authenticating. Consider for example:
prisma.sensitiveinfo.find_unique(where={
"id": id,
"owner": owner,
})
owner is redundant, but it is still useful.