This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Java 5, ENUM and Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Java 5, ENUM and Hibernate" Watch "Java 5, ENUM and Hibernate" New topic
Author

Java 5, ENUM and Hibernate

Angela Stempfel
Greenhorn

Joined: Nov 27, 2001
Posts: 15
hi all

i have some problems with the flexible enum solutiion described here:
http://hibernate.org/272.html
The following error occurs when calling the nullSafeGet method:



my method looks like that:



My Enum class:


And here the parts of my mapping file:



Some help appreciated! Other solutions with UserTypes and ENUM's are welcome as well.

Kind Regards
Angela
[ August 30, 2006: Message edited by: Angela Stempfel ]
Angela Stempfel
Greenhorn

Joined: Nov 27, 2001
Posts: 15
i finally found the solution! the method fromInt must be defined as static!

angela
 
GeeCON Prague 2014
 
subject: Java 5, ENUM and Hibernate