There is no READABLE property named 'XXXX' class 'java.lang.String'
아이바티스를 사용할 때 parameterClass 가 java.lang.String 과 같이 단일 항목일 경우, 다이나믹 조건을 사용할 때 발생할 수 있는 에러 입니다.
예를 들어 단일 파라미터 항목의 이름이 userId일 경우,
〈select id="xxxx" resultMap="xxxx" parameterClass="java.lang.String" >
...
〈dynamic>
〈isNotEmpty property="userId">
where user_id = #userId#
〈/isNotEmpty>
〈/dynamic>
...
〈/select>
로 할경우 위의 에러가 발생합니다.
parameterClass 가 단일 항목일 경우에는 다음과 같이 property 구문을 생략하고 조건을 걸어야 합니다.
주의할 점은 실제 조건절에는 #userId#와 같이 변수명을 입력합니다.
〈select id="xxxx" resultMap="xxxx" parameterClass="java.lang.String" >
...
〈dynamic>
〈isNotEmpty>
where user_id = #userId#
〈/isNotEmpty>
〈/dynamic>
...
〈/select>
댓글
댓글 쓰기