1 2 3 4 5 6 | <select id="boardDao.selectBoard" parameterClass="Map" resultMap="selectClobResult"> SELECT NAME , TITLE , CONTENT FROM T_BOARD </select> |
CONTENT컬럼의 DataType이 CLOB일 경우 결과를 가져오지 못한다.
xml 상단에 있는 resultMap을 수정해야한다.
1 2 3 4 5 | <resultMap id="selectClobResult" class="cmap"> <result property="NAME" column="NAME" /> <result property="TITLE" column="TITLE" /> <result property="CONTENT" column="CONTENT" jdbcType="CLOB" javaType="java.lang.String"/> </resultMap> |
jdbcType과 javaType을 추가해주면 잘 가져와진다.
저 방법으로 안되면 VO로 가져오는게 심신에 좋다.
'실무 짬바 > Oracle' 카테고리의 다른 글
| [Oracle] SEQUENCE 맞추기 (0) | 2019.03.14 |
|---|---|
| [Oracle] 계층형 쿼리 / 순환 쿼리 (0) | 2019.03.14 |
| [Oracle] 테이블 정의서 / 명세서 쿼리 (0) | 2019.03.14 |
| [Oracle] ORA-02292 무결성 제약조건 (0) | 2019.02.21 |
| [Oracle] HTML 태그 제거 정규식 (0) | 2019.02.21 |