• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

how to map enum values into different columns in hibernate

 
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!
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic