It\'s possible to define enumerations in JPA using either
@Enumerated(EnumType.ORDINAL)
or
@Enumerated(EnumType.STRING)
I would prefer EnumType.STRING. A disadvantage of EnumType.ORDINAL is the effect of time and the desire to keep enums in a logical order. With EnumType.ORDINAL any new enum elements must be added to the end of the list or you will accidentally change the meaning of all your records. please check this link: https://tomee.apache.org/examples-trunk/jpa-enumerated/