How to Customize Enum Mappings with @EnumeratedValue

The post How to Customize Enum Mappings with @EnumeratedValue appeared first on Thorben Janssen . Mapping enums with Jakarta Persistence looks simple at first. But the two traditional options, @Enumerated(EnumType.STRING) and @Enumerated(EnumType.ORDINAL), depend on internal enum details that can change over time. If you store the enum value as a String, you will have to migrate your data whenever…