A Missing Features in iBatis ?
By admin on Mar 10, 2008 in Java
Well, I think this is a missing feature in iBatis. Gave up after I searched and searched again for more information.
<resultMap id="TableA" class="com.twit88.valueobject.TableA"> <result column="COL_1" property="col1" jdbcType="VARCHAR"/> <result column="COL_2" property="col2" jdbcType="VARCHAR"/> <result column="COL_3" property="col3" jdbcType="TIMESTAMP"/> </resultMap> <select id="select-record" resultMap="MyResult" parameterClass="com.twit88.valueobject.TableA"> <![CDATA[ select COL_1, COL_2 from tableA ]]> </select>
The above will not work since my SELECT statement only return COL_1 and COL_2 and the ResultMap is expecting 3 columns. I can always write a ResultMap with 2 columns, but this is really a hassle. I could not say that the column is OPTIONAL !!!
Sorry, comments for this entry are closed at this time.