Java Enum to PostgreSQL Enum Type lowecase
See original GitHub issueHI,
I have issue try to implement “Mapping a Java Enum to a database-specific Enumerated column type” from https://vladmihalcea.com/the-best-way-to-map-an-enum-type-with-jpa-and-hibernate/
my case is that in my PostgreSQL I have lowercase:
CREATE TYPE STATUS AS ENUM ('active', 'inactive');
No enum constant com.amcn.api.persistence.model.AccountState.active; nested exception is java.lang.IllegalArgumentException: No enum constant com.amcn.api.persistence.model.AccountState.active
org.springframework.dao.InvalidDataAccessApiUsageException: No enum constant com.amcn.api.persistence.model.AccountState.active; nested exception is java.lang.IllegalArgumentException: No enum constant com.amcn.api.persistence.model.AccountState.active
Caused by: java.lang.IllegalArgumentException: No enum constant com.amcn.api.persistence.model.AccountState.active
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
postgresql - How to make a ENUM data type lowercase in SQL?
CREATE TYPE location AS ENUM ( 'New York', 'Los Angeles', 'Chicago', 'London','Paris','Tokyo' );. I can't use the lower() function on it because ...
Read more >Documentation: 15: 8.7. Enumerated Types - PostgreSQL
Enumerated (enum) types are data types that comprise a static, ordered set of values. ... operators and related aggregate functions are supported for...
Read more >MySQL 8.0 Reference Manual :: 11.3.5 The ENUM Type
An ENUM is a string object with a value chosen from a list of permitted values that are enumerated explicitly in the column...
Read more >Java enum valueOf uppercase or lowercase - Dirask - Dirask
Does the size of letter matters when I use enum valueOf() method? For example: Can I use lowercase letters like \
Read more >Enum Types - Java™ Tutorials
An enum type is a special data type that enables for a variable to be a set of predefined constants. The variable must...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Looks like a good implementation. I’ll add it to the current Enum types.
@hinrik Thanks. Looking forward to it.