In the months between 3.0.4 and the latest 3.0.6-SNAPSHOT of MyBatis, a breaking change was introduced regarding extended resultmaps. Consider the following example:
<resultMap id="summaryMap" type="Foo">
<constructor>
<idarg column="id" javaType="String"/>
</constructor> ...
</resultMap>
<resultMap id="detailsMap" type="Foo" extends="summaryMap">
...
</resultMap>
While this worked fine in version 3.0.4, upgrading to 3.0.6 resulted in exceptions thrown during parsing of the mapper file (and ambiguous ones at that, having nothing to do with the actual problem). It turns out the problem is the constructor specified in summaryMap. Perhaps this falls in line with the documented usage where a discriminator is used to instantiate derived types in a hierarchy, implying a potential need for diverging constructors, but it seems wasteful to repeat property mappings if it can be avoided...
<resultMap id="baseMap" type="Foo">
...
</result>
<resultMap id="summaryMap" type="Foo" extends="baseMap">
<constructor>
<idarg column="id" javaType="String"/>
</constructor> ...
</resultMap>
<resultMap id="detailsMap" type="Foo" extends="baseMap">
<constructor>
<idarg column="id" javaType="String"/>
</constructor> ...
</resultMap>
By going all out with resultMap extension, we can offload common properties into a base map and stay DRY. Regrettably, repeating the constructor cannot be avoided as it is the culprit behind the problem at hand, but this is certainly better than repeating everything.