Skip to content

[Feature Request] Use Enum field type in JSON type #1834

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

Closed
onimitch opened this issue Nov 6, 2024 · 1 comment
Closed

[Feature Request] Use Enum field type in JSON type #1834

onimitch opened this issue Nov 6, 2024 · 1 comment

Comments

@onimitch
Copy link

onimitch commented Nov 6, 2024

Is your feature request related to a problem? Please describe.
I'd like to be able to do this (or a similar alternative solution):

enum TagType {
    One
    Two
    Three
}

type TestData {
    tag     TagType?
    eventId String?
}

model Test {
    id   String   @id @default(cuid())
    data TestData @json
}
@ymc9
Copy link
Member

ymc9 commented Nov 7, 2024

fixed in 2.8.1

@ymc9 ymc9 closed this as completed Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants