• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ordinal Value of ENUM and JPA

 
Binu K Idicula
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
I have used the @Enumerated(EnumType.ORDINAL)for persisting an ENUM. However the ordinal is not overridable for Java ENUM like C++ allows. Has any of you worked around this issue?
Enum ordinal starts with 0, and incremements by 1. Or is there a way to assign explicitly?

regards
Binu K Idicula
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic