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

Support for extendedWhereUnique behavior #1066

@kovaxis

Description

@kovaxis

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions