Ability to change default sql type mappings [DATAJDBC-526]
Alexander Gladskoy opened DATAJDBC-526 and commented
Please provide ability to bind parameter to non-default sql-type. For example I have this code
@Query("update someTable set stringAttr = :stringAttr where id = :id")
int updateString(@Param("id") long id, @Param("stringAttr") String stringAttr);
And I want the parameter stringAttr to be binded to NVARCHAR instead of default VARCHAR
Issue Links:
-
DATAJDBC-397 SpEL support for
@Queryannotation
Jeffrey Wayne Castellow commented
Use this setting sendStringParametersAsUnicode=true
in yml,
append to the datasource url : jdbc
or in
tomcat "connection-properties:"
Jeffrey Wayne Castellow commented
I would like to ask, the reverse, I have just upgraded to Spring Boot 2.3.2, and I want to to prevent binding to NVARCHAR and instead use the of default VARCHAR. We have no Unicode in out system and NVARCHAR is suddenly drastically affecting performance.
This setting that used to work now does not work after the upgrade: sendStringParametersAsUnicode=false
Can you shed some light on this?
Jens Schauder commented
jeffreycw1 that is an unrelated issue. Please create a new issue and include a reproducer demonstrating the problem