Regression in handling of String passed as Types.OTHER to JdbcTemplate [SPR-12890] #17488
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: regression
A bug that is also a regression
Milestone
Alex Panchenko opened SPR-12890 and commented
For PostgreSQL if columns are defined as JSON or XML, then String values should be passed via setObject. We are doing that via JdbcTemplate.
Now that code throws an exception after the change 759f430 from #13215 which always passes String via setString().
As I commented on the commit: IMHO JdbcTemplate should not be too smart - if I pass String as OTHER - it should reach the driver as is. OTHER is documented as "indicates that the SQL type is database-specific and gets mapped to a Java object that can be accessed via the methods getObject and setObject" So, probably some other place using OTHER is just not doing that correctly?
Affects: 4.1 GA
Issue Links:
Referenced from: commits 050e581, e95a7a4
The text was updated successfully, but these errors were encountered: