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
Duplicate identifier 'CheckSelect' #9669
Comments
Can confirm:
and
|
I think we can prefix all auto generated interfaces with |
After looking through the issues, we had a couple of more clashes that needed additional work: 1. `Check` and `Has` collide with built-in `CheckSelect`/`HasSelect` types. Those types are not public and not used since prisma 4.16.0, so I just removed them from generated file. 2. `Promise` is more complicated and required aliasing built-in type. Fix #17542 Fix #9669 Close #12469
…#20215) * fix(client): Allow to use `Check`, `Has` and `Promise` as model names After looking through the issues, we had a couple of more clashes that needed additional work: 1. `Check` and `Has` collide with built-in `CheckSelect`/`HasSelect` types. Those types are not public and not used since prisma 4.16.0, so I just removed them from generated file. 2. `Promise` is more complicated and required aliasing built-in type. Fix #17542 Fix #9669 Close #12469 * Ensure type alias is still displayed as `Promise` in editor * Try different method --------- Co-authored-by: Joël Galeran <Jolg42@users.noreply.github.com>
This is fixed and the fix will be published as a part of 5.1 release. You can also check out |
Tried the 5.1.0-dev.25, still getting the duplicate identifier error
|
@subhendupsingh this issue is specifically about being able to name model |
Bug description
I have a model in my prisma schema called
Check
which looks like it causes prisma to generate conflicting types.In
.prisma/client/index.ts
I am getting a typescript warning as there are 2CheckSelect
types:How to reproduce
Check
model to prisma.schemaprisma generate
I dont think there is anything complicated going on here.
Expected behavior
I would expect prisma to either warn me that I cannot create a model called
Check
or handle the conflict in another way.Prisma information
I think this can be replicated with something as simple as this:
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: