Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
-
DataMapper: 1.1.458.0
Description
If I try to access a result map in a different namespace using this syntax:
<sqlMap namespace="XYZ" ...>
<statements>
<select id="GetMany" resultMap="ABC.FooResult" parameterClass="map">
I get an exception complaining that resultMap XYZ.ABC.FooResult is not defined. ABC.FooResult is defined in a seperate xml file. In my SqlMap.config file, the xml file containing ABC.FooResult appears before the XYZ resultmap file:
<sqlMaps>
<sqlMap resource="ABC.xml" />
<sqlMap resource="XYZ.xml" />
</sqlMaps>
Java people in the #ibatis chatroom (Brandon and Larry) said that to reference a external result map, you needed to do so before the id tag:
<sqlMap namespace="XYZ" ...>
<statements>
<select resultMap="ABC.FooResult" id="GetMany" parameterClass="map">
That didn't work in IBatisNet.
I also tried creating a local resultmap that extended an external resultmap:
<sqlMap namespace="XYZ" ...>
<resultMaps>
<resultMap id="FooResult" extends="ABC.FooResult" />
</resultMaps>
<statements>
<select id="GetMany" resultMap="FooResult" parameterClass="map">
I received an exception saying something about ABC.FooResult not being found.