• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Enumeration mapping doesn't work in JPA

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'm stuck on this problem and I'd like to ask you guys for help. I'm having trouble mapping an Enumeration using JPA annotations.
I'm using Hibernate 3.5.6 as a persistence provider and I'm also using Spring ORM (version 3.0.4).
One of my entities has an enum field. This entity doesn't get a corresponding table generated.

I'm getting following errors:

If I remove the enumeration field, then Hibernate creates the table for this entity without problems.
Here is the entity class:

The class for this enumeration looks like this:

Does anyone have any ideas? I just can't see what's wrong with the mapping. Without the Position enum, everything works OK.
 
Vladimir Kroupa
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, it looks like that position is a reserved SQL keyword. Who would have thought that...
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic