mybatis foreach标签
<select id="selectTestForEach" parameterType="News" resultMap="NewsResultMapper">select * from t_news n where
<foreach collection="listTag" index="index" item="tag" open="("
separator="," close=")">
#{tag} in n.tags
</foreach>
foreach 生成的效果是集合 转化为下面的
select * from t_news n where ( ? in n.tags , ? in n.tags )
页:
[1]