Has anyone ever tried this? The method below throws an exception:
public void nullSafeSet(PreparedStatement st, Object value, int index)
throws HibernateException, SQLException {
try {
Object identifier = value != null ?
identifierMethod.invoke(value, new Object[0]) : null;
st.setObject(index, identifier);
}
catch(Exception exception) {
throw new HibernateException(
"Exception while invoking identifierMethod of
enumeration class: ", exception);
}
}
Well, invoke shouldn`t be used with an instance and not a class
declaration? It's throwing an IllegalArgumentException:object is not an
instance of declaring class
If i hack it and put StateEnum.FL instead I get it working. As I don't
know enums quite enough I really do not have an answer for that, wonder
if someone does.
Regars |