Hi,
Is there a clear answer to the question : what is the best way to persist enums.
I need to have a base class for my enums and I don't want to have one usertype class for each enum.
Browsing the site and the forum there is two differents possibilities :
- Use commons-lang valuedenum as shown at
http://opensource.atlassian.com/project ... wse/HB-934
- Create my own persistentenum class that implements usertype. All my enums will extends this base class. There is a document on the wiki about that :
http://www.hibernate.org/203.html
This solution seems very attractive for me as I need this base class for other purposes. Another benefit of this version is that I don't have to depends on commons-lang.
I just want Hibernate's team opinion about this implementation of enums. Is it something recommended or not ?
Thanx
Seb