Hello,
Thank you for this great library.
I test it for some days but i encounter a problem : when i use the MyBatis3RenderingStrategy like the samples, i can't use easily like the myBatis3 functionnal call :
With MyBatis dynamic sql, i can write a query like :
select id from table where id = #{id}
with a function like :
public Dto selectById(@Param(value = "id") Integer id);
myBatis automatically map the id parameter, that's great !
But with the new DynamicSql MyBatis3RenderingStrategy, the same query is formatted like this :
select id from table where id = #{parameters.p1,jdbcType=INTEGER}
and myBatis is unable to map the id parameter.
I can use a Parameter bean containing the sql query and the id parameter, but i prefer to use parameters on function call rather than using a new bean for each call.
So i have wrote my own Renderer like this :
public class SimpleMyBatis3RenderingStrategy extends RenderingStrategy { @Override public String getFormattedJdbcPlaceholder(BindableColumn<?> column, String prefix, String parameterName) { return "#{"+ ((SqlColumn) column).name() + "}"; } }
It's not very pretty, i know, but it works.
Have you planned to make this kind of Renderer in future ?
Or maybe there is another method to use for generating a compatible query with the functionnal calling ?