wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes Hibernate Xdoclet : how to mapping Enum in Java to Hibernate hbm.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate Xdoclet : how to mapping Enum in Java to Hibernate hbm.xml" Watch "Hibernate Xdoclet : how to mapping Enum in Java to Hibernate hbm.xml" New topic
Author

Hibernate Xdoclet : how to mapping Enum in Java to Hibernate hbm.xml

Jeffrey Hsu
Greenhorn

Joined: Aug 03, 2005
Posts: 1
Code:

[Rating.java]
public enum Rating {
Public, Normal, Private;
}

[Message.java]
public class Message {
private Rating rating;
...
/**
* @hibernate.property
* ??how to write??
*
*/
public Rating getRating() {
return rating;
}
...
}

thanks for your answer.
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
I'm going to move this to the Object Relational Mapping forum which is more suitable for Hibernate questions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate Xdoclet : how to mapping Enum in Java to Hibernate hbm.xml
 
Similar Threads
Nested Enums and Classes
Porting my enum type from Hibernate2 to Hibernate3
Storing enums in database
enum static methods
Storing Enum Types