[HHH-17496] Use Enum#name() for DB value
This commit is contained in:
parent
f8bfb85ce1
commit
04ecdc6add
|
@ -83,13 +83,13 @@ public class PostgreSQLEnumJdbcType implements JdbcType {
|
|||
@Override
|
||||
protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options)
|
||||
throws SQLException {
|
||||
st.setObject( index, value, Types.OTHER );
|
||||
st.setObject( index, ((Enum<?>) value).name(), Types.OTHER );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doBind(CallableStatement st, X value, String name, WrapperOptions options)
|
||||
throws SQLException {
|
||||
st.setObject( name, value, Types.OTHER );
|
||||
st.setObject( name, ((Enum<?>) value).name(), Types.OTHER );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue