[HHH-17496] Use Enum#name() for DB value

This commit is contained in:
cmuchinsky 2023-12-18 11:11:30 -05:00 committed by Christian Beikov
parent f8bfb85ce1
commit 04ecdc6add
1 changed files with 2 additions and 2 deletions

View File

@ -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 );
}
};
}