Postgresql enum type #2390
Unanswered
waveskimmer
asked this question in
Q&A
Replies: 1 comment 3 replies
-
|
Please see an example https://github.com/micronaut-projects/micronaut-data/blob/master/data-jdbc/src/test/groovy/io/micronaut/data/jdbc/postgres/PostgresEnumSpec.groovy |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We'd like to create an enum type such as:
A Text field works fine, but I get this error with the above:
io.micronaut.data.exceptions.DataAccessException: Error executing PERSIST: ERROR: column "color" is of type enum_colors but expression is of type character varying
Hint: You will need to rewrite or cast the expression.
Position: 62
But, cast to what??
Here's my Entity:
I have this distilled into a small project. Let me know if where to put it.
Beta Was this translation helpful? Give feedback.
All reactions