Meaningless Drivel is fun!*
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java 5, ENUM and Hibernate
 
Similar Threads
Mapping enum in JPA/Hibernate
Using Hibernate & JScience together?
Reflection problem: object is not an instance of declaring class
JDBC Metadata - constructing CREATE of existing table..
Hibernate Issue