This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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
enum static methods
Porting my enum type from Hibernate2 to Hibernate3
Storing enums in database
Storing Enum Types