ul.udr_id in
<foreach item="item" index="index" collection="udrIds" open="(" separator="," close=")">
#{item}
</foreach>
collection : 전달 받은 인자 값
collection은 객체로 List나 배열을 전달 받을 수 있다.
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
#{item.value}
</foreach>
이렇게도 사용 가능함
'개발 > Mybatis' 카테고리의 다른 글
Mibatis trim 동적SLQ (0) | 2018.02.11 |
---|---|
Mybatis] insert 후 key 값 가져오기 (0) | 2018.02.11 |
ibatis에 insert 후 시퀀스 값 리턴 받기 (0) | 2018.02.11 |
Mybatis Error - IllegalArgumentException: Mapped Statements collection already contains value (0) | 2018.02.10 |