• Post Reply Bookmark Topic Watch Topic
  • New Topic

Ordinal Value of ENUM and JPA  RSS feed

 
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!