Persistence Framework/iBatis, MyBatis
[iBatis] ParameterClass가 String일 경우 isNotEmpty property 설정여부
trueman
2022. 4. 21. 16:04
728x90
728x90
<select id="selectCity" parameterClass="String" resultClass="cityVO">
select ssg_nm
from city
where 1=1
<isNotEmpty property="sgg_cd">
WHERE SSG_CD = #sgg_cd#
</isNotEmpty>
</select>
com.ibatis.common.beans.ProbeException : There is no READABLE property named 'str' in class 'java.lang.String'
위와 같은 에러가 발생한다.
iBatis에서 파라미터가 단일(String, Int)일 경우 isNotEmpty, isNotNull 등에 대해 property를 설정하지 않아야 한다.
728x90
728x90