Description
I found the following problem and report it.
If I have time, I will fix it and create a pull request.
MyBatis version
3.5.11
Database vendor and version
SQLite3 (probably for any vendor)
Test case or example project
https://github.com/tsasaki609/mybatis-3-sscce-foreach-with-bind
Steps to reproduce
check out the example project and run
Expected result
09:44:57.720 [main] DEBUG mybatis.sscce.foreach.with.bind.FooMapper.countBar - ==> Preparing: SELECT count(*) FROM bar WHERE id IN ( ? , ? )
09:44:57.755 [main] DEBUG mybatis.sscce.foreach.with.bind.FooMapper.countBar - ==> Parameters: test001(String), test002(String)
09:44:57.787 [main] DEBUG mybatis.sscce.foreach.with.bind.FooMapper.countBar - <== Total: 1
2
Actual result
09:44:57.720 [main] DEBUG mybatis.sscce.foreach.with.bind.FooMapper.countBar - ==> Preparing: SELECT count(*) FROM bar WHERE id IN ( ? , ? )
09:44:57.755 [main] DEBUG mybatis.sscce.foreach.with.bind.FooMapper.countBar - ==> Parameters: test002(String), test002(String)
09:44:57.787 [main] DEBUG mybatis.sscce.foreach.with.bind.FooMapper.countBar - <== Total: 1
1