It's not a secret anymore!*
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 Android Security Essentials Live Lessons this week in the Android 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
Storing enums in database
Storing Enum Types
Nested Enums and Classes
enum static methods
Porting my enum type from Hibernate2 to Hibernate3