Fixed
Details
Assignee
Čedomir IgalyČedomir IgalyReporter
H. LoH. LoComponents
Fix versions
Affects versions
Priority
Minor
Details
Details
Assignee
Čedomir Igaly
Čedomir IgalyReporter
H. Lo
H. LoComponents
Fix versions
Affects versions
Priority
Created April 21, 2023 at 8:56 AM
Updated April 30, 2024 at 8:13 PM
Resolved May 10, 2023 at 8:07 AM
Few days ago I switched my Java Spring Boot project from Hibernate ORM 6.1.7 to Hibernate ORM 6.2.1.
The underlying database is MySQL 8 which supports
enum
data type.In one of my entities I have `enum` which is annotated by
@Enumerated(EnumType.STRING)
and so far it was working as expected -varchar
table column was created by Hibernate few years ago.After switching to Hibernate ORM 6.2.1 this table column was converted to MySQL’s
enum
data type.When I try to start my app with
spring.jpa.hibernate.ddl-auto
set tovalidate
- an exception is thrown:If I change
ddl-auto
setting toupdate
ornone
, the table column ofenum
type stays as it is and application can boot up.Steps are:
spring.jpa.hibernate.ddl-auto = update
run the app
database is updated
stop the app
spring.jpa.hibernate.ddl-auto = validate
run the app
exception is thrown
Hibernate Discourse post: