Enum as field type #665
Replies: 5 comments 2 replies
-
Please define user scalar provider |
Beta Was this translation helpful? Give feedback.
-
Thanks. It seems like this is something Jimmer could do automatically and I didn't see anything in the docs regarding the need to do this with enums. I also had to add a DraftInterceptor to set the default values, as it seems my
|
Beta Was this translation helpful? Give feedback.
-
Oh, enum can be handled by Jimmer automatically. You ware not saying Postgres specified enum. |
Beta Was this translation helpful? Give feedback.
-
No problem. please view |
Beta Was this translation helpful? Give feedback.
-
Please view There is no difference between the H2 driver and Postgres, this test passed. Please check whether your app changes the default scalar provider of enum. If this problem still exists, please provide minimized reproduce project and sql script. |
Beta Was this translation helpful? Give feedback.
-
I have a field in my Entity defined like so:
@Default("ACTIVE") val status: UserStatus
UserStatus is an enum that looks like this:
When I insert an object with this value set, I have no problems. However, if I want to insert with the default value (ACTIVE) I get the following error from the Postgres driver:
I have default enum strategy set to NAME, which I think is default anyway. Do I need to add a scalar provider for all my enums or is there something else I should be doing?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions