ibatis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgrabow...@apache.org
Subject svn commit: r389972 - in /ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql: Account.xml Category.xml DynamicAccount.xml Enumeration.xml LineItem.xml Order.xml Other.xml ParameterClass.xml
Date Thu, 30 Mar 2006 02:55:00 GMT
Author: rgrabowski
Date: Wed Mar 29 18:54:58 2006
New Revision: 389972

URL: http://svn.apache.org/viewcvs?rev=389972&view=rev
Log:
Revision 389819 required parameterMap nodes have a class attribute. Only the parameterMaps
in the tests for SqlClient were updated. This commit adds the class attribute to the MySql
sqlMaps.

Modified:
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Account.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Category.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/DynamicAccount.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Enumeration.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/LineItem.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Order.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Other.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/ParameterClass.xml

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Account.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Account.xml?rev=389972&r1=389971&r2=389972&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Account.xml (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Account.xml Wed Mar
29 18:54:58 2006
@@ -580,12 +580,12 @@
     ============================================= -->
 	<parameterMaps>   
 		
-		<parameterMap id="swap-params">
+		<parameterMap id="swap-params" class="Hashtable">
 			<parameter property="email1" column="First_Email" />
 			<parameter property="email2" column="Second_Email" />
 		</parameterMap>
 		
-		<parameterMap id="insert-params">
+		<parameterMap id="insert-params" class="Hashtable">
 			<parameter property="Id" />
 			<parameter property="FirstName" />
 			<parameter property="LastName" />			
@@ -594,14 +594,14 @@
 			<parameter property="CartOption"	column="Account_Cart_Option" typeHandler="HundredsBool"/>
		
 		</parameterMap>
 		
-		<parameterMap id="update-params">
+		<parameterMap id="update-params" class="Account">
 			<parameter property="FirstName" />
 			<parameter property="LastName" />			
 			<parameter property="EmailAddress" nullValue="no_email@provided.com"/>
 			<parameter property="Id" />
 		</parameterMap>
 		
-		<parameterMap id="update-params2">
+		<parameterMap id="update-params2" class="Account">
 			<parameter property="Id" />
 			<parameter property="FirstName" />
 			<parameter property="LastName" />			

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Category.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Category.xml?rev=389972&r1=389971&r2=389972&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Category.xml (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Category.xml Wed Mar
29 18:54:58 2006
@@ -121,43 +121,43 @@
 	</statements>
 	
 	<parameterMaps>
-		<parameterMap id="insert-params">
+		<parameterMap id="insert-params" class="Category">
 			<parameter property="Id" column="Category_Id" dbType="Int32" />
 			<parameter property="Name" column="Category_Name"/>
 			<parameter property="GuidString" column="Category_Guid" dbType="Varchar"/>
 		</parameterMap>
 		
-		<parameterMap id="InsertParam">
+		<parameterMap id="InsertParam" class="Category">
 			<parameter property="Name" column="Category_Name"/>
 			<parameter property="GuidString" column="Category_Guid" dbType="Varchar"/>
 		</parameterMap>
 		
-		<parameterMap id="insert-null-params">
+		<parameterMap id="insert-null-params" class="Category">
 			<parameter property="Name" column="Category_Name"/>
 			<parameter property="GuidString" column="Category_Guid" nullValue="00000000-0000-0000-0000-000000000000"
dbType="Varchar"/>
 		</parameterMap>
 		
-		<parameterMap id="UpdateParam" extends="InsertParam">
+		<parameterMap id="UpdateParam" extends="InsertParam" class="Category">
 			<parameter property="Id" column="Category_Id" />
 		</parameterMap>
 		
 		<!-- Used by generated statement -->
 		
-		<parameterMap id="insert-generate-params">
+		<parameterMap id="insert-generate-params" class="Category">
 			<parameter property="Name" column="Category_Name"/>
 			<parameter property="GuidString" column="Category_Guid" dbType="Varchar"/>
 		</parameterMap>
 		
-		<parameterMap id="update-generate-params" extends="insert-generate-params">
+		<parameterMap id="update-generate-params" extends="insert-generate-params" class="Category">
 			<parameter property="Id" column="Category_Id" />
 		</parameterMap>
 		
-		<parameterMap id="delete-generate-params">
+		<parameterMap id="delete-generate-params" class="Category">
 			<parameter property="Id" column="Category_Id" />
 			<parameter property="Name" column="Category_Name"/>
 		</parameterMap>
 		
-		<parameterMap id="select-generate-params">
+		<parameterMap id="select-generate-params" class="Category">
 			<parameter property="Id" column="Category_Id" />
 			<parameter property="Name" column="Category_Name"/>
 			<parameter property="GuidString" column="Category_Guid" dbType="Varchar"/>

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/DynamicAccount.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/DynamicAccount.xml?rev=389972&r1=389971&r2=389972&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/DynamicAccount.xml (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/DynamicAccount.xml Wed
Mar 29 18:54:58 2006
@@ -443,6 +443,25 @@
 
 			order by Account_LastName
 		</statement>
+		
+		<insert id="SelectKeyWithDynamicSql">
+			INSERT INTO $AccountsTableName$
+			(
+				Account_ID, 
+				Account_FirstName,
+				Account_LastName
+			) 
+			VALUES 
+			(
+				#Account.Id#, 
+				#Account.FirstName#,
+				#Account.LastName#
+			)
+			<selectKey property="AccountId" type="post" resultClass="int">
+				SELECT Account_ID FROM $AccountsTableName$ WHERE Account_ID = #Account.Id#
+			</selectKey>			
+		</insert>
+		
 	</statements>
 
 	

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Enumeration.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Enumeration.xml?rev=389972&r1=389971&r2=389972&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Enumeration.xml (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Enumeration.xml Wed
Mar 29 18:54:58 2006
@@ -49,7 +49,7 @@
 	</statements>
 	
 	<parameterMaps>
-		<parameterMap id="insert-params">
+		<parameterMap id="insert-params" class="Enumeration">
 			<parameter property="Id" column="Enum_ID" />
 			<parameter property="Day" column="Enum_Day"/>
 			<parameter property="Color" column="Enum_Color" />

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/LineItem.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/LineItem.xml?rev=389972&r1=389971&r2=389972&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/LineItem.xml (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/LineItem.xml Wed Mar
29 18:54:58 2006
@@ -177,7 +177,7 @@
   
 	<parameterMaps>   
 		
-		<parameterMap id="insert-params">
+		<parameterMap id="insert-params" class="LineItem">
 			<parameter property="Id" />
 			<parameter property="Order.Id" />
 			<parameter property="Code" />			
@@ -185,7 +185,7 @@
 			<parameter property="Price" dbType="Decimal" nullValue="-99.99"/>
 		</parameterMap>
 				
-		<parameterMap id="insert-params-picture">
+		<parameterMap id="insert-params-picture" class="LineItem">
 			<parameter property="Id" />
 			<parameter property="Order.Id" />
 			<parameter property="Code" />			

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Order.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Order.xml?rev=389972&r1=389971&r2=389972&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Order.xml (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Order.xml Wed Mar 29
18:54:58 2006
@@ -438,7 +438,7 @@
 
 	<parameterMaps>   
 		
-		<parameterMap id="insert-params">
+		<parameterMap id="insert-params" class="Order">
 			<parameter property="Id" dbType="Int32"/>
 			<parameter property="Account.Id"/>
 			<parameter property="Date" nullValue="01/01/0001 00:00:00" />
@@ -451,7 +451,7 @@
 			<parameter property="PostalCode" />
 		</parameterMap>
 		
-		<parameterMap id="params-parent"> <!-- 1043181 support request -->
+		<parameterMap id="params-parent" class="Order"> <!-- 1043181 support request -->
 			<parameter property="Id" dbType="Int32"/>	
 			<parameter property="Account.Id"/>
 			<parameter property="Date" nullValue="01/01/0001 00:00:00" />
@@ -464,7 +464,7 @@
 			<parameter property="PostalCode" />		
 		</parameterMap>
 		
-		<parameterMap id="insert-extend" extends="params-parent">
+		<parameterMap id="insert-extend" extends="params-parent" class="Order">
 		</parameterMap>
 		
 	</parameterMaps>

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Other.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Other.xml?rev=389972&r1=389971&r2=389972&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Other.xml (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Other.xml Wed Mar 29
18:54:58 2006
@@ -159,7 +159,7 @@
 	</statements>
 	
 		<parameterMaps>   
-		<parameterMap id="insert-params">
+		<parameterMap id="insert-params" class="Other">
 			<parameter property="Int" />
 			<parameter property="Long" />
 			<parameter property="Bool" />			

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/ParameterClass.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/ParameterClass.xml?rev=389972&r1=389971&r2=389972&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/ParameterClass.xml (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/ParameterClass.xml Wed
Mar 29 18:54:58 2006
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <sqlMap namespace="ParameterClass" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ibatis.apache.org http://ibatis.apache.org/xsd/SqlMap.xsd">
 	<statements>
-		<select id="GetCountOfAccountsWithNullEmail">
+		<select id="GetCountOfAccountsWithNullEmail" resultClass="int">
 			SELECT COUNT(*) FROM Accounts WHERE Account_Email IS NULL
 		</select>	
 		<update id="UpdateNullEmailToDBNull" parameterClass="Hashtable">
@@ -9,6 +9,21 @@
 				Account_Email = #DBNullValue#
 			WHERE
 				Account_Email IS NULL
-		</update>		
+		</update>
+		<!--
+		<insert id="ValidXmlWithSelectKeyPropertyAndIDictionaryParameterClass" parameterClass="Hashtable">
+			<selectKey property="Id" type="post" resultClass="int">
+			</selectKey>
+		</insert>	
+		<insert id="InsertAndSelectKeyWithIDictionaryParameterClass" parameterClass="Hashtable">
+			insert into Accounts 
+				(Account_ID, Account_FirstName, Account_LastName, Account_Email) 
+			values 
+				(#Id#, #FirstName#, #LastName#, #EmailAddress#)
+			<selectKey property="SelectKeyId" type="post" resultClass="int">
+				SELECT Account_ID FROM Accounts WHERE Account_ID = #Id#
+			</selectKey>
+		</insert>
+		-->
 	</statements>	
 </sqlMap>



Mime
View raw message