New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build fails when enabling extendedWhereUnique
Prisma preview feature
#91
Comments
@sethmiller thanks for pointing this out. I wasn't aware of this feature and didn't have time to look into this. since it is a preview feature it's not top priority on my list (unlike #90) so it could take a while til I can address this issue. |
That makes sense. Prisma does some pretty advanced stuff their Typescript types so I could see this being a pain. The folks (folk?) over at prisma-zod-generator added support for Thanks for looking into this! |
@sethmiller the |
I just pulled down the latest version and it successfully generated against our project. We have a table with more than 3 unique constraints. It looks ok to me but I haven't had a chance to thoroughly test it yet. Thanks again for the quick fix! |
I checked the prisma generated types again and it seems that the union in the generated schema can be optimized a bit but it should work. I'll close this issue for now. Please reopen when new problems arise. |
I looked in the issues list and didn't find a duplicate of this issue.
Issue
Enabling the
extendedWhereUnique
preview feature causes the generated code to fail to build. As best as I can tell it is because the*WhereUniqueInput
types are now wrapped inPrisma.AtLeast
which changes the type of unique fields and in some cases makes them non-optional.The error is
Reproduction
I made a repo to reproduce the issue.
For convenience, the
schema.prisma
file isThe text was updated successfully, but these errors were encountered: