You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Shuang Yi Deng <de...@cn.ibm.com> on 2009/09/07 05:09:17 UTC
Problem about resultMap
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:qiyadeng@hotmail.com
Email:dengshy@cn.ibm.com qiyadeng@gmail.com shydeng@ica.stc.sh.cn
Phone:13472456455
-----------------------------------------------