Db2 Mybaits resultMap没有列,请改用columnIndex

Db2 Mybaits resultMap没有列,请改用columnIndex,db2,mybatis,ibatis,Db2,Mybatis,Ibatis,我正在从ibatis迁移到mybatis,在ibatis中,它只支持使用columnNumber而不使用列名的结果集,但在mybatis中似乎不支持这一点, 让它在mybatis工作的最佳方式是什么 伊巴蒂斯:这样行吗 <resultMap id="resultMap" type="com.test.data.MyObject"> <result property="key"

我正在从ibatis迁移到mybatis,在ibatis中,它只支持使用columnNumber而不使用列名的结果集,但在mybatis中似乎不支持这一点, 让它在mybatis工作的最佳方式是什么

伊巴蒂斯:这样行吗

<resultMap id="resultMap" type="com.test.data.MyObject">    
    <result property="key"                   columnIndex="1"/>
    <result property="number"                columnIndex="2"/>
</resultMap>


在mybatis中,这种列索引不受支持,它需要列名称。

恐怕您必须使用列标签或列名称。是的,不再有列索引。