JAVA-078 / Intermediate
Confusing MyBatis #{} and ${} when constructing IN clauses
Why is this a problem?
IN (${ids}) substitutes the comma-separated list directly.
How to fix it
xml
WHERE id IN <foreach item="id" collection="list" open="(" separator="," close=")">#{id}</foreach>