Skip to content

Regression in handling of String passed as Types.OTHER to JdbcTemplate [SPR-12890] #17488

Closed
@spring-projects-issues

Description

@spring-projects-issues

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

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions