ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shuang Yi Deng <deng...@cn.ibm.com>
Subject Problem about resultMap
Date Mon, 07 Sep 2009 03:09:17 GMT
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"/>

and a select 

    <select id="getTestBeanList" resultMap="testBeanMap" parameterClass="
        SELECT column1,column2 FROM TESTBEAN

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)


Email:dengshy@cn.ibm.com qiyadeng@gmail.com shydeng@ica.stc.sh.cn


View raw message