[ http://issues.apache.org/jira/browse/IBATISNET-45?page=all ] Roberto Rabe resolved IBATISNET-45: -----------------------------------
Resolution: Fixed (Visible to ibatis-developers) > Unable to reference result maps defined in other xml files when > useStatementNamespaces is set to true > ----------------------------------------------------------------------------------------------------- > > Key: IBATISNET-45 > URL: http://issues.apache.org/jira/browse/IBATISNET-45 > Project: iBatis for .NET > Type: Bug > Environment: DataMapper: 1.1.458.0 > Reporter: Ron Grabowski > Assignee: Gilles Bayon > Priority: Minor > Fix For: DataMapper 1.2 > > 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. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira