When using an @Enumerated(EnumType.STRING) annotation on an embeddable entity property, it is ignored by the orm which saves the enum ordinal value instead of it's string value
Workaround: Moving the @Enumerated(EnumType.STRING) from the property to the getter makes the unit test succeed
When using an @Enumerated(EnumType.STRING) annotation on an embeddable entity property, it is ignored by the orm which saves the enum ordinal value instead of it's string value
Workaround:
Moving the @Enumerated(EnumType.STRING) from the property to the getter makes the unit test succeed
Unit test available on github to demonstrate the bug:
https://github.com/edeoliveira/hibernate-demo/blob/master/src/test/java/org/edeoliveira/hibernate/bugs/embedded/NestedEmbeddedEnumBugTest.java