Suppose we have the following mapping in MyBatis:
<resultMap id="map_X" type="Wrapper">
<result column="....." property="totalCount" />
<collection property="someArray" ofType="hashmap">
<result column="A" property="first" />
<result column="B" property="second" />
</collection>
</resultMap>
<select id="mySelect" resultMap="myMap">
SELECT A, B FROM myTable
</select>
How to set the count of rows in the query into the property totalCount of resulting Wrapper object.