• Post Reply Bookmark Topic Watch Topic
  • New Topic

Mapping filed to custom Enum

 
Sharon whipple
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I use the @Enumerated annotation to bind one of my entities fields to Enum:



RuleType Enum:


The problem started when I wanted to change the num values to different ordinals example:



Is it possible to make hibernate use "myFiled" instead of the enum "ordinal?"

Thank you
Sharon
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!