This seems to have fixed the GenericEnumUserType for me. Very handy.
-----
public void nullSafeSet(PreparedStatement st, Object value, int index)
throws HibernateException, SQLException
{
try
{
if(value == null)
{
st.setObject(index, null);
}
else
{
Object identifier = identifierMethod.invoke(value, new Object[0]);
type.set(st,identifier,index);
}
}
catch (Exception exception)
{
throw new HibernateException("Exception while invoking
identifierMethod '" + identifierMethod + "' of enumeration class: '" +
enumClass + "'",exception);
}
} |