• 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
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!