블로그 이미지
세피롯스

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

Notice

Tag

2009. 4. 29. 18:00 초보프로그래머만..

보통은 셀렉트해올때 리턴되는 값이 고정적이지만..(ex. select a.id,a.name from a)
하다보면 동적인 리턴값을 가져와야할때가 있다.
아이바티스에서 리턴 컬럼이 동적일때(isnotEmpty등을 쓸경우) remapResult = "true"라고 해줘야 리턴 컬럼을 동적으로 보내준다.

(예)
<statement id="timeList" resultClass="ArrayList" remapResult = "true">
select
a.id,
a.name,
<isNotEmpty property="time">
a.time = #time#,
</isNotEmpty>
a.contents
from a
</statement>


posted by 세피롯스