You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only way to avoid LobHandler in DAO code for insert/update:
MapSqlParameterSourceparamSource = newMapSqlParameterSource();
paramSource.addValue("clob", "a long long text", Types.CLOB);
namedTemplate.update(INSERT_STMT, paramSource);
Oleksandr Gavenko opened SPR-11938 and commented
The only way to avoid LobHandler in DAO code for insert/update:
See:
another way (only for JdbcTemplate, not for NamedParameterJdbcTemplate):
java.sql.Types has NCLOB constans for Java 6/7/8:
If I do:
paramSource.addValue("clob", "a long long text", Types.CLOB);
all work fine, but with:
paramSource.addValue("clob", "a long long text", Types.NCLOB);
I get:
Actual type of table column is NCLOB, and with Type.CLOB code work fine.
My suggestion just add NCLOB to
src/main/java/org/springframework/jdbc/core/StatementCreatorUtils.java
with same role as CLOB!Affects: 3.2.9, 4.0.5
Issue Links:
The text was updated successfully, but these errors were encountered: