Skip to content
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

Model named "Check" is incorrectly typed #7655

Closed
Tracked by #7963
mohamedGamalAbuGalala opened this issue Jun 14, 2021 · 3 comments
Closed
Tracked by #7963

Model named "Check" is incorrectly typed #7655

mohamedGamalAbuGalala opened this issue Jun 14, 2021 · 3 comments
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/client Issue for team Client. tech/typescript Issue for tech TypeScript. topic: reserved words See https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#naming-conventions topic: type-clash
Milestone

Comments

@mohamedGamalAbuGalala
Copy link

Bug description

I have a model called Check, after running Prisma generate. There will be 2 different types with the same key CheckSelect one used by the Prisma client itself and the other is generated to give the ability to select properties while querying the Check model.

How to reproduce

  1. open this sandbox
  2. npm run db:generate
  3. npm run build

Expected behavior

Check should be a valid name for a model with no duplicate types with its name

Prisma information

Environment & setup

  • OS: Debian
  • Database: Any of those[PostgreSQL, MySQL, MariaDB or SQLite]
  • Node.js version: v14.16.1

Prisma Version

2.24.1
@mohamedGamalAbuGalala mohamedGamalAbuGalala added the kind/bug A reported bug. label Jun 14, 2021
@mohamedGamalAbuGalala
Copy link
Author

After a look in the issues section. I found that it belongs to the label: "topic: reserved words"

@janpio janpio added bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. topic: reserved words See https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#naming-conventions team/client Issue for team Client. tech/typescript Issue for tech TypeScript. labels Jun 14, 2021
@pantharshit00
Copy link
Contributor

I can confirm this bug, thanks for reporting.

@pantharshit00 pantharshit00 added bug/2-confirmed Bug has been reproduced and confirmed. process/candidate and removed bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. labels Jun 15, 2021
@SevInf
Copy link
Contributor

SevInf commented Jul 18, 2023

This is fixed and the fix will be published as a part of 5.1 release. You can also check out 5.1.0-dev.25 dev snapshot - we do not recommend using dev snapshots in production, but it should be enough to verify the fix.

@SevInf SevInf closed this as completed Jul 18, 2023
@janpio janpio added this to the 5.1.0 milestone Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/client Issue for team Client. tech/typescript Issue for tech TypeScript. topic: reserved words See https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#naming-conventions topic: type-clash
Projects
None yet
Development

No branches or pull requests

5 participants