Author: gbayon
Date: Sun Sep 18 11:48:27 2005
New Revision: 289952
URL: http://svn.apache.org/viewcvs?rev=289952&view=rev
Log:
- Updated MySQL mapping file
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Other.xml
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Other.xml
URL:
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Other.xml?rev=289952&r1=289951&r2=289952&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Other.xml
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Other.xml
Sun Sep 18 11:48:27 2005
@@ -4,6 +4,12 @@
<alias>
<typeAlias alias="Other"
type="IBatisNet.DataMapper.Test.Domain.Other, IBatisNet.DataMapper.Test"/>
+ <typeAlias alias="A" type="IBatisNet.DataMapper.Test.Domain.A,
IBatisNet.DataMapper.Test"/>
+ <typeAlias alias="B" type="IBatisNet.DataMapper.Test.Domain.B,
IBatisNet.DataMapper.Test"/>
+ <typeAlias alias="C" type="IBatisNet.DataMapper.Test.Domain.C,
IBatisNet.DataMapper.Test"/>
+ <typeAlias alias="D" type="IBatisNet.DataMapper.Test.Domain.D,
IBatisNet.DataMapper.Test"/>
+ <typeAlias alias="E" type="IBatisNet.DataMapper.Test.Domain.E,
IBatisNet.DataMapper.Test"/>
+ <typeAlias alias="F" type="IBatisNet.DataMapper.Test.Domain.F,
IBatisNet.DataMapper.Test"/>
</alias>
<resultMaps>
@@ -13,10 +19,68 @@
<result property="Bool" column="Other_Bit"/>
<result property="Bool2" column="Other_String"
typeHandler="OuiNonBool"/>
</resultMap>
+
+ <resultMap id="A-result" class="A" >
+ <result property="Id" column="A_ID"/>
+ <result property="Libelle" column="A_Libelle"/>
+ <result property="B"
resultMapping="Other.B-result"/>
+ <result property="E"
resultMapping="Other.E-result"/>
+ <result property="F"
resultMapping="Other.F-result"/>
+ </resultMap>
+
+ <resultMap id="B-result" class="B" >
+ <result property="Id" column="B_ID"/>
+ <result property="Libelle" column="B_Libelle"/>
+ <result property="C"
resultMapping="Other.C-result"/>
+ <result property="D"
resultMapping="Other.D-result"/>
+ </resultMap>
+
+ <resultMap id="C-result" class="C" >
+ <result property="Id" column="C_ID"/>
+ <result property="Libelle" column="C_Libelle"/>
+ </resultMap>
+
+ <resultMap id="D-result" class="D" >
+ <result property="Id" column="D_ID"/>
+ <result property="Libelle" column="D_Libelle"/>
+ </resultMap>
+
+ <resultMap id="E-result" class="E" >
+ <result property="Id" column="E_ID"/>
+ <result property="Libelle" column="E_Libelle"/>
+ </resultMap>
+
+ <resultMap id="F-result" class="F" >
+ <result property="Id" column="F_ID"/>
+ <result property="Libelle" column="F_Libelle"/>
+ </resultMap>
+
</resultMaps>
<statements>
+ <select id="SelectComplexJoined" resultMap="A-result">
+ SELECT
+ A.Id AS A_ID,
+ A.A_Libelle AS A_Libelle,
+ B.ID AS B_ID,
+ B.B_Libelle AS B_Libelle,
+ C.ID AS C_ID,
+ C.C_Libelle AS C_Libelle,
+ D.ID AS D_ID,
+ D.D_Libelle AS D_Libelle,
+ E.ID AS E_ID,
+ E.E_Libelle AS E_Libelle,
+ F.ID AS F_ID,
+ F.F_Libelle AS F_Libelle
+ FROM A
+ LEFT OUTER JOIN B ON A.B_ID = B.ID
+ LEFT OUTER JOIN C ON B.C_ID = C.ID
+ LEFT OUTER JOIN D ON B.D_ID = D.ID
+ LEFT OUTER JOIN E ON A.E_ID = E.ID
+ LEFT OUTER JOIN F ON A.F_ID = F.ID
+ </select>
+
<statement id="DynamicSelectByIntLong"
parameterClass="Hashtable"
resultMap="other-result">