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

[Feature Request] Use mapped value in Prisma schema to generate enums #284

Open
Zenith2198 opened this issue Nov 4, 2024 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@Zenith2198
Copy link

As it currently stands in Prisma, you are not allowed to create enums that fall outside of the normal variable naming convention. This means for enums with spaces, dashes, begins with a number, etc., you have to create a @map that maps a variable-appropriate name to the variable-inappropriate name. See #4954 in the Prisma repo for more details and examples. This is currently an open issue, with no resolution in sight.

A possible solution to this problem is available through this package by using the @map values in the generated enum types.

Alternative to this, we can only manually build the enum types ourselves instead of relying on the generated ones from this library. I would love for this library to solve every problem I have, and it's really close to being able to. Love it so far!

@chrishoermann chrishoermann added the enhancement New feature or request label Dec 4, 2024
@chrishoermann chrishoermann self-assigned this Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants