Join Slack
Communities
Powered by
Can i use numberics with prisma enums?
# orm-help
h
Halvor
07/27/2021, 12:36 AM
Can i use numberics with prisma enums?
r
Ryan
07/27/2021, 6:27 AM
Do you mean numbers directly?
h
Halvor
07/27/2021, 12:57 PM
Well i use that enum for taking external input via a rest api.
Halvor
07/27/2021, 12:57 PM
So selecting the correct value based on a number provided.
r
Ryan
07/27/2021, 2:13 PM
Currently only text values are supported in enums, so a workaround would be to map the number to the text enum field.
2
Views
Open in Slack
Previous
Next