How do you provide a default enum value to a prope...
# orm-help
h
How do you provide a default enum value to a property? I’ve tried
Copy code
gender: GenderEnum! @default(value: "UNKOWN")
gender: GenderEnum! @default(value: UNKOWN)
gender: GenderEnum! @default(value: GenderEnum.UNKOWN)

enum GenderEnum {
  MALE
  FEMALE
  UNKNOWN
}
n
@halborg did you manage to set this up? The first two should work.
h
Nope, never did. We ended up going with no default for now pending an answer here 🙂 The compiler wouldn’t accept neither of the suggestions
r
you should use UNKNOWN. There is a typo in your second approach
h
That's random, the thread is two years old 😅😂
r
I’m searching for all possible help with enums!
because:
Copy code
Errors:

  Global
    ✖ You are deleting the value 'Primary' of the enum 'BENTYPE', but that value is in use.
just trying to change it to uppercase and I deleted all occurrences of it in code and data.