I am using GenericEnumUserType as suggested in the wiki [1], and have noticed that some tweaking is in order if you want to nest an enum class inside another class. Example:
Code:
public class Something {
public enum Status {
OK,
NOK;
}
private Status status;
}
In order to make this work, I had to make the nested enum static and provide the enumClass property like this: Something$Status. Using Something$1 doesn't work if the enum isn't static, and generates a ClassCastException.
Does anybody see any reason why this might be a bad idea? Is the class-file name format platform-dependent? It might be more orthogonal to support the regular "." notation for the nested class, but in the meantime, does this trip any immediate mental alarms?
1)
http://www.hibernate.org/272.html