Why do I get this error from MyBatis 3?
Caused by: java.sql.SQLSyntaxErrorException: unexpected token: < required: (
This is my SQL:
SELECT * FROM GC0101.AGENT_POOL_CLIENT_ASSIGNMENT WHERE GO_CD = ?
AND ASSIGNMENT_STATUS_CD IN %lt;foreach item="item" index="index"
collection="assignmentStatusCd" open="(" separator="," close=")"%gt;
? %lt;/foreach%gt;
created from this query:
@Select("SELECT * FROM GC0101.AGENT_POOL_CLIENT_ASSIGNMENT WHERE GO_CD =
#{generalOfficeCd, jdbcType=CHAR} AND ASSIGNMENT_STATUS_CD IN " +
"<foreach item=\"item\" index=\"index\" collection=\"assignmentStatusCd\"
open=\"(\" separator=\",\" close=\")\"%gt; #{item, jdbcType=CHAR} %lt;/foreach%gt;")