This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund 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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply 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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Java 5, ENUM and Hibernate
 
Similar Threads
Using Hibernate & JScience together?
Reflection problem: object is not an instance of declaring class
Hibernate Issue
JDBC Metadata - constructing CREATE of existing table..
Mapping enum in JPA/Hibernate