개발 모음집/Java
[ibatis] 다중 property 처리
wonos
2020. 3. 9. 01:33
[ibatis] 다중 property isEmpty/isNotEmpty 처리 예제
멀티 nested tag 를 사용하여 해결 가능
<select id="getSth" resultClass="Object" parameterClass="Object">
select * from table
<isNotEmpty property="startDate" >
<isNotEmpty property="endDate" >
where date_start >= #startDate# AND date_end <= #endDate#
</isNotEmpty>
</isNotEmpty>
</select>
PS : less than '<' => <
greater than '>' => >