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

Enumeration mapping doesn't work in JPA

 
Vladimir Kroupa
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Well, it looks like that position is a reserved SQL keyword. Who would have thought that...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic