I have a resultMap <resultMap id="testBeanMap" class="testBean">
<result property="field1" column="column1"/> <result property="field2" column="column2"/> <result property="field3" column="column3"/> <result property="field4" column="column4"/> <result property="field5" column="column5"/> </resultMap> and a select <select id="getTestBeanList" resultMap="testBeanMap" parameterClass=" string"> SELECT column1,column2 FROM TESTBEAN </select> when I execute my java testcase, the error occurs: --- The error occurred while applying a result map. --- Check the ConsumableUnit.consumableUnitMap. --- Check the result mapping for the 'field3' property. --- Cause: com.ibm.db2.jcc.b.SqlException: [ibm][db2][jcc][10150][10300] property invalid:unknown column Column3。 I search about this problem, some said that we must return all field if you use resultMap, but I don't want return all fields(columns). But i also like to use(reuse) resultMap. Does somebody have use ibatis like this? ----------------------------------------------- Name:邓双义(Deng Shuangyi) msn:qiyad...@hotmail.com email:deng...@cn.ibm.com qiyad...@gmail.com shyd...@ica.stc.sh.cn Phone:13472456455 -----------------------------------------------