I am trying to map the ResultSet of a Sybase Stored Procedure using MyBatis, but I am experiencing some problems with unnamed columns on it. The procedure returns a single row with 4 columns, 2 of which have no name at all:
+---id---|------|-----------|---description---+
1 name1 surname1 desc1
The resultmap .xml file looks like this (check the second and third result tags):
<resultMap id="person" type="foo.Person">
<result column="id" property="id"/>
<result column="" property="name"/>
<result column="" property="surname"/>
<result column="description" property="description"/>
</resultMap>
I have no control of the stored procedure code, so adding an alias to the unnamed columns is not a possibility. Checking the previous versions of MyBatis, I saw that in the past you could inform a columnIndex in the ResultMap, but now it seems to be no longer available. Is there some sort of custom ResultSet handler that could be used for this? Or maybe some kind of customized TypeHandler?