Closed
Description
mybatis: latest
After I use mybaits-generator to generate dynamic-sql
so it will use ProviderSqlSource, the parameterObject will always be xxxProvider;
When parsing sql with RawSqlSource, the ParameterMapping#JavaType will always be java.lang.Object;
I'm wondering if there is any way to make sure the ParameterMapping to get the proper type;
Because in the current scenario; if I register a JsonTypeHanlder like the following; the clazz here will become Java.lang.Object
public class JsonTypeHandler<T> extends BaseTypeHandler<T> {
private final Class<T> clazz;
public JsonTypeHandler(Class<T> clazz) {
// Java.lang.Object
this.clazz = clazz;
}
@Override
public void setNonNullParameter(PreparedStatement ps, int i, T parameter, JdbcType jdbcType) throws SQLException {
}
}