You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ibatis.apache.org by gb...@apache.org on 2005/04/14 19:48:33 UTC

svn commit: r161328 - in incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test: ./ Maps/Access/OleDb/ Maps/MSSQL/Odbc/ Maps/MSSQL/OleDb/ Maps/MSSQL/SqlClient/ Maps/MySql/ByteFx/ NUnit/SqlMapTests/MSSQL/ Scripts/MSSQL/

Author: gbayon
Date: Thu Apr 14 10:48:29 2005
New Revision: 161328

URL: http://svn.apache.org/viewcvs?view=rev&rev=161328
Log:
- Updated unit tests

Added:
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/ps_SelectAccount.sql
Modified:
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.csproj
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Account.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Category.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Account.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Category.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Order.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Account.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Category.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Order.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Account.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Category.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Order.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Account.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Category.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/MSSQL/StatementTest.cs
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/account-init.sql
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/account-procedure.sql
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/category-init.sql
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/category-procedure.sql

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.csproj
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.csproj?view=diff&r1=161327&r2=161328
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.csproj (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.csproj Thu Apr 14 10:48:29 2005
@@ -770,6 +770,10 @@
                     BuildAction = "Content"
                 />
                 <File
+                    RelPath = "Scripts\MSSQL\ps_SelectAccount.sql"
+                    BuildAction = "Content"
+                />
+                <File
                     RelPath = "Scripts\MSSQL\README-embed-param.txt"
                     BuildAction = "Content"
                 />

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Account.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Account.xml?view=diff&r1=161327&r2=161328
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Account.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Account.xml Thu Apr 14 10:48:29 2005
@@ -401,7 +401,7 @@
 		<!-- For procedure, the parameters of the parameterMap must in the same order 
 		as for the procedure paramaters-->
 		<procedure id="InsertAccountViaStoreProcedure" parameterMap="insert-params">
-			sp_InsertAccount
+			ps_InsertAccount
 		</procedure>
 		
 		<procedure id="SwapEmailAddresses" parameterMap="swap-params">

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Category.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Category.xml?view=diff&r1=161327&r2=161328
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Category.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Category.xml Thu Apr 14 10:48:29 2005
@@ -91,7 +91,7 @@
 		</update>
 				
 		<procedure id="InsertCategoryViaStoreProcedure" parameterMap="insert-params">
-			sp_InsertCategorie
+			ps_InsertCategorie
 		</procedure>
 
 		<insert id="InsertCategoryGenerate" parameterMap="insert-generate-params">

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Account.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Account.xml?view=diff&r1=161327&r2=161328
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Account.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Account.xml Thu Apr 14 10:48:29 2005
@@ -406,17 +406,7 @@
 			resultMap="account-result">
 			where Account_ID between #lowID# and #hightID#
 		</select>
-				
-		<!-- For procedure, the parameters of the parameterMap must in the same order 
-		as for the procedure paramaters-->
-		<procedure id="InsertAccountViaStoreProcedure" parameterMap="insert-params">
-			sp_InsertAccount
-		</procedure>
-		
-		<procedure id="SwapEmailAddresses" parameterMap="swap-params">
-			ps_swap_email_address
-		</procedure>
-		
+
 		<select id="SelectAccountJIRA29" parameterClass="map" resultClass="Account">
 			select
 				Account_ID as Id,
@@ -441,7 +431,21 @@
 				(Account_FirstName = '##$Foo$##') 
 			</isNotEmpty> 
 		</select>	
-				
+						
+		<!-- For procedure, the parameters of the parameterMap must in the same order 
+		as for the procedure paramaters-->
+		<procedure id="InsertAccountViaStoreProcedure" parameterMap="insert-params">
+			ps_InsertAccount
+		</procedure>
+		
+		<procedure id="SwapEmailAddresses" parameterMap="swap-params">
+			ps_swap_email_address
+		</procedure>
+
+		<procedure id="GetAccountViaSP" parameterMap="select-params" resultClass="Account">
+			ps_SelectAccount
+		</procedure>
+						
 	</statements>
 
 	<!-- =============================================
@@ -453,7 +457,11 @@
 			<parameter property="email1" column="First_Email" />
 			<parameter property="email2" column="Second_Email" />
 		</parameterMap>
-		
+
+		<parameterMap id="select-params">
+			<parameter property="Account_ID" />
+		</parameterMap>
+				
 		<parameterMap id="insert-params">
 			<parameter property="Id" />
 			<parameter property="FirstName" />

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Category.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Category.xml?view=diff&r1=161327&r2=161328
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Category.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Category.xml Thu Apr 14 10:48:29 2005
@@ -90,7 +90,7 @@
 		</update>
 		
 		<procedure id="InsertCategoryViaStoreProcedure" parameterMap="insert-params">
-			sp_InsertCategorie
+			ps_InsertCategorie
 		</procedure>
 		
 		<insert id="InsertCategoryGenerate" parameterMap="insert-generate-params">

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Order.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Order.xml?view=diff&r1=161327&r2=161328
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Order.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Order.xml Thu Apr 14 10:48:29 2005
@@ -97,7 +97,20 @@
 			<result property="PostalCode" column="Order_PostalCode"/>
 			<result property="Account"    column="Account_ID" select="GetAccountViaColumnName" />
 		</resultMap>
-		
+
+		<resultMap id="order-with-sp-account-result" class="Order">
+			<result property="Id"         column="Order_ID"/>
+			<result property="Date"       column="Order_Date"/>
+			<result property="CardExpiry" column="Order_CardExpiry"/>
+			<result property="CardType"   column="Order_CardType"/>
+			<result property="CardNumber" column="Order_CardNumber"/>
+			<result property="Street"     column="Order_Street"/>
+			<result property="City"       column="Order_City"/>
+			<result property="Province"   column="Order_Province"/>
+			<result property="PostalCode" column="Order_PostalCode"/>
+			<result property="Account"    column="Account_ID=Account_ID" select="GetAccountViaSP" />
+		</resultMap>
+				
 		<resultMap id="order-with-collection-result" class="Order">
 			<result property="Id"				column="Order_ID"/>
 			<result property="Date"				column="Order_Date"/>

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Account.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Account.xml?view=diff&r1=161327&r2=161328
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Account.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Account.xml Thu Apr 14 10:48:29 2005
@@ -406,17 +406,7 @@
 			resultMap="account-result">
 			where Account_ID between #lowID# and #hightID#
 		</select>
-				
-		<!-- For procedure, the parameters of the parameterMap must in the same order 
-		as for the procedure paramaters-->
-		<procedure id="InsertAccountViaStoreProcedure" parameterMap="insert-params">
-			sp_InsertAccount
-		</procedure>
-		
-		<procedure id="SwapEmailAddresses" parameterMap="swap-params">
-			ps_swap_email_address
-		</procedure>
-		
+
 		<select id="SelectAccountJIRA29" parameterClass="map" resultClass="Account">
 			select
 				Account_ID as Id,
@@ -441,6 +431,21 @@
 				(Account_FirstName = '##$Foo$##') 
 			</isNotEmpty> 
 		</select>	
+						
+		<!-- For procedure, the parameters of the parameterMap must in the same order 
+		as for the procedure paramaters-->
+		<procedure id="InsertAccountViaStoreProcedure" parameterMap="insert-params">
+			ps_InsertAccount
+		</procedure>
+		
+		<procedure id="SwapEmailAddresses" parameterMap="swap-params">
+			ps_swap_email_address
+		</procedure>
+		
+		<procedure id="GetAccountViaSP" parameterMap="select-params" resultClass="Account">
+			ps_SelectAccount
+		</procedure>
+		
 	</statements>
 
 	<!-- =============================================
@@ -452,7 +457,11 @@
 			<parameter property="email1" column="First_Email" />
 			<parameter property="email2" column="Second_Email" />
 		</parameterMap>
-		
+
+		<parameterMap id="select-params">
+			<parameter property="Account_ID" />
+		</parameterMap>
+				
 		<parameterMap id="insert-params">
 			<parameter property="Id" />
 			<parameter property="FirstName" />

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Category.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Category.xml?view=diff&r1=161327&r2=161328
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Category.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Category.xml Thu Apr 14 10:48:29 2005
@@ -90,7 +90,7 @@
 		</update>
 				
 		<procedure id="InsertCategoryViaStoreProcedure" parameterMap="insert-params">
-			sp_InsertCategorie
+			ps_InsertCategorie
 		</procedure>
 
 		<insert id="InsertCategoryGenerate" parameterMap="insert-generate-params">

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Order.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Order.xml?view=diff&r1=161327&r2=161328
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Order.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Order.xml Thu Apr 14 10:48:29 2005
@@ -98,6 +98,19 @@
 			<result property="Account"    column="Account_ID" select="GetAccountViaColumnName" />
 		</resultMap>
 		
+		<resultMap id="order-with-sp-account-result" class="Order">
+			<result property="Id"         column="Order_ID"/>
+			<result property="Date"       column="Order_Date"/>
+			<result property="CardExpiry" column="Order_CardExpiry"/>
+			<result property="CardType"   column="Order_CardType"/>
+			<result property="CardNumber" column="Order_CardNumber"/>
+			<result property="Street"     column="Order_Street"/>
+			<result property="City"       column="Order_City"/>
+			<result property="Province"   column="Order_Province"/>
+			<result property="PostalCode" column="Order_PostalCode"/>
+			<result property="Account"    column="Account_ID=Account_ID" select="GetAccountViaSP" />
+		</resultMap>
+				
 		<resultMap id="order-with-collection-result" class="Order">
 			<result property="Id"				column="Order_ID"/>
 			<result property="Date"				column="Order_Date"/>

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Account.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Account.xml?view=diff&r1=161327&r2=161328
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Account.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Account.xml Thu Apr 14 10:48:29 2005
@@ -452,16 +452,6 @@
 			where Account_ID between #lowID# and #hightID#
 		</select>
 		
-		<!-- For procedure, the parameters of the parameterMap must in the same order 
-		as for the procedure paramaters-->
-		<procedure id="InsertAccountViaStoreProcedure" parameterMap="insert-params">
-			sp_InsertAccount
-		</procedure>
-		
-		<procedure id="SwapEmailAddresses" parameterMap="swap-params">
-			ps_swap_email_address
-		</procedure>
-		
 		<select id="SelectAccountJIRA29" parameterClass="map" resultClass="Account">
 			select
 				Account_ID as Id,
@@ -470,8 +460,8 @@
 				Account_Email as EmailAddress
 			from Accounts
 			where Account_FirstName = '##$AccountName$##'
-		</select>
-		
+		</select>	
+			
 		<select id="SelectAccountJIRA29-2"
 				parameterClass="Hashtable"
 				resultClass="Account">
@@ -486,6 +476,20 @@
 				(Account_FirstName = '##$Foo$##') 
 			</isNotEmpty> 
 		</select>	
+				
+		<!-- For procedure, the parameters of the parameterMap must in the same order 
+		as for the procedure paramaters-->
+		<procedure id="InsertAccountViaStoreProcedure" parameterMap="insert-params">
+			ps_InsertAccount
+		</procedure>
+		
+		<procedure id="SwapEmailAddresses" parameterMap="swap-params">
+			ps_swap_email_address
+		</procedure>
+
+		<procedure id="GetAccountViaSP" parameterMap="select-params" resultClass="Account">
+			ps_SelectAccount
+		</procedure>
 		
 	</statements>
 
@@ -499,6 +503,10 @@
 			<parameter property="email2" column="Second_Email" />
 		</parameterMap>
 		
+		<parameterMap id="select-params">
+			<parameter property="Account_ID" />
+		</parameterMap>
+				
 		<parameterMap id="insert-params">
 			<parameter property="Id" />
 			<parameter property="FirstName" />

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Category.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Category.xml?view=diff&r1=161327&r2=161328
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Category.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Category.xml Thu Apr 14 10:48:29 2005
@@ -90,7 +90,7 @@
 		</update>
 
 		<procedure id="InsertCategoryViaStoreProcedure" parameterMap="insert-params">
-			sp_InsertCategorie
+			ps_InsertCategorie
 		</procedure>
 		
 		<insert id="InsertCategoryGenerate" parameterMap="insert-generate-params">

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Order.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Order.xml?view=diff&r1=161327&r2=161328
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Order.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Order.xml Thu Apr 14 10:48:29 2005
@@ -98,6 +98,19 @@
 			<result property="Account"    column="Account_ID" select="GetAccountViaColumnName" />
 		</resultMap>
 		
+		<resultMap id="order-with-sp-account-result" class="Order">
+			<result property="Id"         column="Order_ID"/>
+			<result property="Date"       column="Order_Date"/>
+			<result property="CardExpiry" column="Order_CardExpiry"/>
+			<result property="CardType"   column="Order_CardType"/>
+			<result property="CardNumber" column="Order_CardNumber"/>
+			<result property="Street"     column="Order_Street"/>
+			<result property="City"       column="Order_City"/>
+			<result property="Province"   column="Order_Province"/>
+			<result property="PostalCode" column="Order_PostalCode"/>
+			<result property="Account"    column="Account_ID=Account_ID" select="GetAccountViaSP" />
+		</resultMap>
+		
 		<resultMap id="order-with-collection-result" class="Order">
 			<result property="Id"				column="Order_ID"/>
 			<result property="Date"				column="Order_Date"/>
@@ -223,6 +236,12 @@
 		<statement id="GetOrderWithAccount"
 					parameterClass="int"
 					resultMap="order-with-account-result" >
+			select * from Orders where Order_ID = #value#
+		</statement>
+		
+		<statement id="GetOrderWithAccountViaSP"
+					parameterClass="int"
+					resultMap="order-with-sp-account-result" >
 			select * from Orders where Order_ID = #value#
 		</statement>
 		

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Account.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Account.xml?view=diff&r1=161327&r2=161328
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Account.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Account.xml Thu Apr 14 10:48:29 2005
@@ -446,7 +446,7 @@
 		<!-- For procedure, the parameters of the parameterMap must in the same order 
 		as for the procedure paramaters-->
 		<procedure id="InsertAccountViaStoreProcedure" parameterMap="insert-params">
-			sp_InsertAccount
+			ps_InsertAccount
 		</procedure>
 		
 		<procedure id="SwapEmailAddresses" parameterMap="swap-params">

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Category.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Category.xml?view=diff&r1=161327&r2=161328
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Category.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Category.xml Thu Apr 14 10:48:29 2005
@@ -78,7 +78,7 @@
 		</update>
 
 		<procedure id="InsertCategoryViaStoreProcedure" parameterMap="insert-params">
-			sp_InsertCategorie
+			ps_InsertCategorie
 		</procedure>
 		
 		<insert id="InsertCategoryGenerate" parameterMap="insert-generate-params">

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/MSSQL/StatementTest.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/MSSQL/StatementTest.cs?view=diff&r1=161327&r2=161328
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/MSSQL/StatementTest.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/MSSQL/StatementTest.cs Thu Apr 14 10:48:29 2005
@@ -26,7 +26,9 @@
 			InitSqlMap();
 			InitScript( sqlMap.DataSource, ScriptDirectory + "account-init.sql" );
 			InitScript( sqlMap.DataSource, ScriptDirectory + "account-procedure.sql", false );
+			InitScript( sqlMap.DataSource, ScriptDirectory + "ps_SelectAccount.sql", false );
 			InitScript( sqlMap.DataSource, ScriptDirectory + "category-init.sql" );
+			InitScript( sqlMap.DataSource, ScriptDirectory + "order-init.sql" );
 		}
 
 		/// <summary>
@@ -195,6 +197,16 @@
 			Assert.AreEqual(category.Guid.ToString(), categoryRead.Guid.ToString());
 		}
 
+		/// <summary>
+		/// Test select via store procedure
+		/// </summary>
+		[Test] 
+		public void TestSelect()
+		{
+			Order order = (Order) sqlMap.QueryForObject("GetOrderWithAccountViaSP", 1);
+			AssertOrder1(order);
+			AssertAccount1(order.Account);
+		}
 		#endregion
 
 

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/account-init.sql
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/account-init.sql?view=diff&r1=161327&r2=161328
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/account-init.sql (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/account-init.sql Thu Apr 14 10:48:29 2005
@@ -33,8 +33,11 @@
 
 -- Store procedure
 
-if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_InsertAccount]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
-drop procedure [dbo].[sp_InsertAccount]
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ps_InsertAccount]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
+drop procedure [dbo].[ps_InsertAccount]
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ps_SelectAccount]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
+drop procedure [dbo].[ps_SelectAccount]
 
 if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ps_swap_email_address]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
 drop procedure [dbo].[ps_swap_email_address]

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/account-procedure.sql
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/account-procedure.sql?view=diff&r1=161327&r2=161328
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/account-procedure.sql (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/account-procedure.sql Thu Apr 14 10:48:29 2005
@@ -1,4 +1,4 @@
-CREATE PROCEDURE dbo.[sp_InsertAccount]
+CREATE PROCEDURE dbo.[ps_InsertAccount]
 @Account_ID  [int], 
 @Account_FirstName [nvarchar] (40),
 @Account_LastName [varchar] (32),
@@ -8,4 +8,3 @@
 			(Account_ID, Account_FirstName, Account_LastName, Account_Email) 
 values 
 			(@Account_ID, @Account_FirstName, @Account_LastName, @Account_Email)
-

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/category-init.sql
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/category-init.sql?view=diff&r1=161327&r2=161328
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/category-init.sql (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/category-init.sql Thu Apr 14 10:48:29 2005
@@ -13,5 +13,5 @@
 
 -- Store procedure
 
-if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_InsertCategorie]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
-drop procedure [dbo].[sp_InsertCategorie]
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ps_InsertCategorie]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
+drop procedure [dbo].[ps_InsertCategorie]

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/category-procedure.sql
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/category-procedure.sql?view=diff&r1=161327&r2=161328
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/category-procedure.sql (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/category-procedure.sql Thu Apr 14 10:48:29 2005
@@ -1,4 +1,4 @@
-CREATE PROCEDURE dbo.[sp_InsertCategorie]
+CREATE PROCEDURE dbo.[ps_InsertCategorie]
 @Category_Id [int] output,
 @Category_Name [varchar] (32),
 @Category_Guid [uniqueidentifier] 

Added: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/ps_SelectAccount.sql
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/ps_SelectAccount.sql?view=auto&rev=161328
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/ps_SelectAccount.sql (added)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/ps_SelectAccount.sql Thu Apr 14 10:48:29 2005
@@ -0,0 +1,10 @@
+CREATE PROCEDURE dbo.[ps_SelectAccount]
+@Account_ID  [int]
+AS
+select
+	Account_ID as Id,
+	Account_FirstName as FirstName,
+	Account_LastName as LastName,
+	Account_Email as EmailAddress
+from Accounts
+where Account_ID = @Account_ID
\ No newline at end of file