반응형

<resultMap id="content" type="dataMap">
    <result column="CONTENT" property="content" jdbcType="CLOB" javaType="java.lang.String"/>
</resultMap>
<select id="bbsList" parameterType="map" resultType="dataMap" resultMap="content">
    select bbs_id
          ,subject
          ,content
    from tb_bbs
</select>

반응형
반응형

자주 까먹어서 메모

 

구분IBATISMYBATIS
SELECT조회된 ROW 갯수
INSERTNULL1
UPDATE1수정된 ROW 갯수
DELETE삭제된 ROW 갯수

다중 INSERT 또는 UPDATE 일 때 결과 값이 무조건 1 이 나오는 경우 (NULL일 경우에는 1로 변환 하여 증가 시킴 될듯..)

int resultCnt =0;
for(int i =1; i < resultList.size(); i++){
	resultCnt += commonMybatisDao.update("remodel.insertRemodel",excelMap);		
}	
return resultCnt;

 

반응형

+ Recent posts