Skip to content

selectStatementProvider.getParameters() support for custom typeHandlers #131

Closed
@krevelen

Description

@krevelen

When I specify a custom typeHandler, in my case for mapping org.javamoney.moneta.FastMoney to JdbcType.INTEGER for a PostGreSQL database using org.mybatis.dynamic.sql.SqlTable#column(...), the type handler does not seem to handle my query parameter values e.g. upon calling SelectStatementProvider#getParameters() as argument for the constructor of MapSqlParameterSource(Map<>) required by Spring's NamedParameterJdbcTemplate#query(...), and I get:

org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select ...]; nested exception is org.postgresql.util.PSQLException: Can't infer the SQL type to use for an instance of org.javamoney.moneta.FastMoney. Use setObject() with an explicit Types value to specify the type to use.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions