Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to map enum values into different columns in hibernate

 
Juan Manuel Saad
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to have fixed values for some fields on my DB, so I declared enums and I want to map them into the DB with that fixed values. What is the best solution for that?

Right now I've coded this (it doesn't work)

My table in the DB:



POJO Class:



My enum class:



if you have some other ideas that will work better, please teach me how I'm new at hibernate!

Thanks in advance!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic