You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ibatis.apache.org by ro...@apache.org on 2005/05/14 07:23:26 UTC
svn commit: r170123 - in
/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test:
Maps/Access/OleDb/ Maps/MSSQL/Odbc/ Maps/MSSQL/OleDb/ Maps/MSSQL/SqlClient/
Maps/MySql/ByteFx/ Maps/MySql/MySql/ Maps/Oracle/ODP/
Maps/Oracle/OracleClient/ NUnit/SqlMapTests/
Author: roberto
Date: Fri May 13 22:23:24 2005
New Revision: 170123
URL: http://svn.apache.org/viewcvs?rev=170123&view=rev
Log:
~Updated C# DataMapper StatementTest.cs and related NUnit maps for JIRA 30 (TODO)
Modified:
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Account.xml
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Account.xml
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Account.xml
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Account.xml
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Account.xml
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Account.xml
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/Account.xml
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/Account.xml
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs
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?rev=170123&r1=170122&r2=170123&view=diff
==============================================================================
--- 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 Fri May 13 22:23:24 2005
@@ -397,6 +397,22 @@
resultMap="account-result">
where Account_ID between #lowID# and #hightID#
</select>
+
+ <select id="GetAccountWithRepeatingProperty"
+ parameterClass="Account"
+ resultMap="account-result">
+ select
+ Account_ID,
+ Account_FirstName,
+ Account_LastName,
+ Account_Email
+ from Accounts
+ where Account_ID = #Id# and
+ Account_ID = #Id# and
+ Account_FirstName = #FirstName# and
+ Account_LastName = #LastName# and
+ Account_ID = #Id#
+ </select>
<!-- For procedure, the parameters of the parameterMap must in the same order
as for the procedure paramaters-->
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?rev=170123&r1=170122&r2=170123&view=diff
==============================================================================
--- 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 Fri May 13 22:23:24 2005
@@ -431,6 +431,22 @@
(Account_FirstName = '##$Foo$##')
</isNotEmpty>
</select>
+
+ <select id="GetAccountWithRepeatingProperty"
+ parameterClass="Account"
+ resultMap="account-result">
+ select
+ Account_ID,
+ Account_FirstName,
+ Account_LastName,
+ Account_Email
+ from Accounts
+ where Account_ID = #Id# and
+ Account_ID = #Id# and
+ Account_FirstName = #FirstName# and
+ Account_LastName = #LastName# and
+ Account_ID = #Id#
+ </select>
<!-- For procedure, the parameters of the parameterMap must in the same order
as for the procedure paramaters-->
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?rev=170123&r1=170122&r2=170123&view=diff
==============================================================================
--- 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 Fri May 13 22:23:24 2005
@@ -431,6 +431,22 @@
(Account_FirstName = '##$Foo$##')
</isNotEmpty>
</select>
+
+ <select id="GetAccountWithRepeatingProperty"
+ parameterClass="Account"
+ resultMap="account-result">
+ select
+ Account_ID,
+ Account_FirstName,
+ Account_LastName,
+ Account_Email
+ from Accounts
+ where Account_ID = #Id# and
+ Account_ID = #Id# and
+ Account_FirstName = #FirstName# and
+ Account_LastName = #LastName# and
+ Account_ID = #Id#
+ </select>
<!-- For procedure, the parameters of the parameterMap must in the same order
as for the procedure paramaters-->
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?rev=170123&r1=170122&r2=170123&view=diff
==============================================================================
--- 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 Fri May 13 22:23:24 2005
@@ -476,6 +476,22 @@
(Account_FirstName = '##$Foo$##')
</isNotEmpty>
</select>
+
+ <select id="GetAccountWithRepeatingProperty"
+ parameterClass="Account"
+ resultMap="account-result">
+ select
+ Account_ID,
+ Account_FirstName,
+ Account_LastName,
+ Account_Email
+ from Accounts
+ where Account_ID = #Id# and
+ Account_ID = #Id# and
+ Account_FirstName = #FirstName# and
+ Account_LastName = #LastName# and
+ Account_ID = #Id#
+ </select>
<!-- For procedure, the parameters of the parameterMap must in the same order
as for the procedure paramaters-->
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?rev=170123&r1=170122&r2=170123&view=diff
==============================================================================
--- 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 Fri May 13 22:23:24 2005
@@ -477,6 +477,22 @@
</isNotEmpty>
</select>
+ <select id="GetAccountWithRepeatingProperty"
+ parameterClass="Account"
+ resultMap="account-result">
+ select
+ Account_ID,
+ Account_FirstName,
+ Account_LastName,
+ Account_Email
+ from Accounts
+ where Account_ID = #Id# and
+ Account_ID = #Id# and
+ Account_FirstName = #FirstName# and
+ Account_LastName = #LastName# and
+ Account_ID = #Id#
+ </select>
+
<!-- For procedure, the parameters of the parameterMap must in the same order
as for the procedure paramaters-->
<procedure id="InsertAccountViaStoreProcedure" parameterMap="insert-params">
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Account.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Account.xml?rev=170123&r1=170122&r2=170123&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Account.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Account.xml Fri May 13 22:23:24 2005
@@ -476,7 +476,23 @@
(Account_FirstName = '##$Foo$##')
</isNotEmpty>
</select>
-
+
+ <select id="GetAccountWithRepeatingProperty"
+ parameterClass="Account"
+ resultMap="account-result">
+ select
+ Account_ID,
+ Account_FirstName,
+ Account_LastName,
+ Account_Email
+ from Accounts
+ where Account_ID = #Id# and
+ Account_ID = #Id# and
+ Account_FirstName = #FirstName# and
+ Account_LastName = #LastName# and
+ Account_ID = #Id#
+ </select>
+
<!-- For procedure, the parameters of the parameterMap must in the same order
as for the procedure paramaters-->
<procedure id="InsertAccountViaStoreProcedure" parameterMap="insert-params">
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/Account.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/Account.xml?rev=170123&r1=170122&r2=170123&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/Account.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/Account.xml Fri May 13 22:23:24 2005
@@ -518,6 +518,22 @@
</isNotEmpty>
</select>
+ <select id="GetAccountWithRepeatingProperty"
+ parameterClass="Account"
+ resultMap="account-result">
+ select
+ Account_ID,
+ Account_FirstName,
+ Account_LastName,
+ Account_Email
+ from Accounts
+ where Account_ID = #Id# and
+ Account_ID = #Id# and
+ Account_FirstName = #FirstName# and
+ Account_LastName = #LastName# and
+ Account_ID = #Id#
+ </select>
+
<!-- For procedure, the parameters of the parameterMap must in the same order
as for the procedure paramaters-->
<!--
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/Account.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/Account.xml?rev=170123&r1=170122&r2=170123&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/Account.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/Account.xml Fri May 13 22:23:24 2005
@@ -517,6 +517,22 @@
</isNotEmpty>
</select>
+ <select id="GetAccountWithRepeatingProperty"
+ parameterClass="Account"
+ resultMap="account-result">
+ select
+ Account_ID,
+ Account_FirstName,
+ Account_LastName,
+ Account_Email
+ from Accounts
+ where Account_ID = #Id# and
+ Account_ID = #Id# and
+ Account_FirstName = #FirstName# and
+ Account_LastName = #LastName# and
+ Account_ID = #Id#
+ </select>
+
<procedure id="InsertAccountViaStoreProcedure" parameterMap="insert-params">
prc_InsertAccount
</procedure>
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs?rev=170123&r1=170122&r2=170123&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs Fri May 13 22:23:24 2005
@@ -45,7 +45,7 @@
#region Object Query tests
/// <summary>
- /// Test use a satement with property subtitution
+ /// Test use a statement with property subtitution
/// (JIRA 22)
/// </summary>
[Test]
@@ -53,6 +53,24 @@
{
Account account = sqlMap.QueryForObject("SelectWithProperty", null) as Account;
AssertAccount1(account);
+ }
+
+ /// <summary>
+ /// Test JIRA 30 (repeating property)
+ /// TODO JIRA 30 repeating property for all providers
+ /// </summary>
+ [Test]
+ public void TestJIRA30()
+ {
+ Account account = new Account();
+ account.Id = 1;
+ account.FirstName = "Joe";
+ account.LastName = "Dalton";
+ account.EmailAddress = "Joe.Dalton@somewhere.com";
+
+ Account result = sqlMap.QueryForObject("GetAccountWithRepeatingProperty", account) as Account;
+
+ AssertAccount1(result);
}
/// <summary>