• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to map enum values into different columns in hibernate

Juan Manuel Saad
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!
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
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!