I just downloaded the latest annotations beta (3.1beta8) and tried using the enum type in a regular, non-annotationed class (with hbm.xml). It was working fine right up until the enum property of a class was used in a query, at which point it blew up on me.
After a little poking around, I was suprised to find this in EnumType.java:
Code:
113: public void nullSafeSet(...) throws ... {
114: //if (!guessed) guessType( st, index );
Given that the sqlType is defaulted to Integer, it seems that if you're using a String backing sequence it will work up until it needs to set a value as a bind parameter.
I guess what I'm really wondering is, is there a reason this got commented out? Is this no longer needed if you're running using an AnnotationConfiguration? I've worked around it for now using the 'type' parameter to EnumType. Thanks,[/code]