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/23 01:56:23 UTC
svn commit: r172603 - in /incubator/ibatis/trunk/cs: ./
mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/
mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/
mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/
mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/
mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/
mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/
mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/
mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/
mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/
Author: roberto
Date: Sun May 22 16:56:20 2005
New Revision: 172603
URL: http://svn.apache.org/viewcvs?rev=172603&view=rev
Log:
~Added C# DataMapper NUnit test for Complex Inline default null (JIRA-2). Test passes all except Access/MSSQL OleDb/MSSQL ODBC not tested.
Modified:
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Complex.xml
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Complex.xml
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Complex.xml
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Complex.xml
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Complex.xml
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/Complex.xml
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/Complex.xml
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/Complex.xml
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ComplexTypeTest.cs
incubator/ibatis/trunk/cs/to-do.txt
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Complex.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Complex.xml?rev=172603&r1=172602&r2=172603&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Complex.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Complex.xml Sun May 22 16:56:20 2005
@@ -9,6 +9,15 @@
select Account_ID from Accounts where Account_ID = #obj.Map.Id#
</statement>
+ <insert id="InsertComplexAccountViaInlineDefaultNull"
+ parameterClass="Hashtable" >
+ insert into Accounts
+ (Account_ID, Account_FirstName, Account_LastName, Account_Email)
+ values
+ (#obj.Map.acct.Id#, #obj.Map.acct.FirstName#, #obj.Map.acct.LastName#, #obj.Map.acct.EmailAddress:VarChar:no_email@provided.com#
+ )
+ </insert>
+
</statements>
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Complex.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Complex.xml?rev=172603&r1=172602&r2=172603&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Complex.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Complex.xml Sun May 22 16:56:20 2005
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<sqlMap namespace="Category" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="SqlMap.xsd">
@@ -8,6 +8,15 @@
resultClass="int" >
select Account_ID from Accounts where Account_ID = #obj.Map.Id#
</statement>
+
+ <insert id="InsertComplexAccountViaInlineDefaultNull"
+ parameterClass="Hashtable" >
+ insert into Accounts
+ (Account_ID, Account_FirstName, Account_LastName, Account_Email)
+ values
+ (#obj.Map.acct.Id#, #obj.Map.acct.FirstName#, #obj.Map.acct.LastName#, #obj.Map.acct.EmailAddress:VarChar:no_email@provided.com#
+ )
+ </insert>
</statements>
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Complex.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Complex.xml?rev=172603&r1=172602&r2=172603&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Complex.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Complex.xml Sun May 22 16:56:20 2005
@@ -8,7 +8,16 @@
resultClass="int" >
select Account_ID from Accounts where Account_ID = #obj.Map.Id#
</statement>
-
+
+ <insert id="InsertComplexAccountViaInlineDefaultNull"
+ parameterClass="Hashtable" >
+ insert into Accounts
+ (Account_ID, Account_FirstName, Account_LastName, Account_Email)
+ values
+ (#obj.Map.acct.Id#, #obj.Map.acct.FirstName#, #obj.Map.acct.LastName#, #obj.Map.acct.EmailAddress:VarChar:no_email@provided.com#
+ )
+ </insert>
+
</statements>
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Complex.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Complex.xml?rev=172603&r1=172602&r2=172603&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Complex.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Complex.xml Sun May 22 16:56:20 2005
@@ -9,6 +9,15 @@
select Account_ID from Accounts where Account_ID = #obj.Map.Id#
</statement>
+ <insert id="InsertComplexAccountViaInlineDefaultNull"
+ parameterClass="Hashtable" >
+ insert into Accounts
+ (Account_ID, Account_FirstName, Account_LastName, Account_Email)
+ values
+ (#obj.Map.acct.Id#, #obj.Map.acct.FirstName#, #obj.Map.acct.LastName#, #obj.Map.acct.EmailAddress:VarChar:no_email@provided.com#
+ )
+ </insert>
+
</statements>
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Complex.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Complex.xml?rev=172603&r1=172602&r2=172603&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Complex.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Complex.xml Sun May 22 16:56:20 2005
@@ -9,6 +9,15 @@
select Account_ID from Accounts where Account_ID = #obj.Map.Id#
</statement>
+ <insert id="InsertComplexAccountViaInlineDefaultNull"
+ parameterClass="Hashtable" >
+ insert into Accounts
+ (Account_ID, Account_FirstName, Account_LastName, Account_Email)
+ values
+ (#obj.Map.acct.Id#, #obj.Map.acct.FirstName#, #obj.Map.acct.LastName#, #obj.Map.acct.EmailAddress:varchar:no_email@provided.com#
+ )
+ </insert>
+
</statements>
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/Complex.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/Complex.xml?rev=172603&r1=172602&r2=172603&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/Complex.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/Complex.xml Sun May 22 16:56:20 2005
@@ -8,6 +8,15 @@
select Account_ID from Accounts where Account_ID = #obj.Map.Id:Int32#
</statement>
+ <insert id="InsertComplexAccountViaInlineDefaultNull"
+ parameterClass="Hashtable" >
+ insert into Accounts
+ (Account_ID, Account_FirstName, Account_LastName, Account_Email)
+ values
+ (#obj.Map.acct.Id#, #obj.Map.acct.FirstName#, #obj.Map.acct.LastName#, #obj.Map.acct.EmailAddress:Varchar2:no_email@provided.com#
+ )
+ </insert>
+
</statements>
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/Complex.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/Complex.xml?rev=172603&r1=172602&r2=172603&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/Complex.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/Complex.xml Sun May 22 16:56:20 2005
@@ -8,6 +8,15 @@
select Account_ID from Accounts where Account_ID = #obj.Map.Id#
</statement>
+ <insert id="InsertComplexAccountViaInlineDefaultNull"
+ parameterClass="Hashtable" >
+ insert into Accounts
+ (Account_ID, Account_FirstName, Account_LastName, Account_Email)
+ values
+ (#obj.Map.acct.Id#, #obj.Map.acct.FirstName#, #obj.Map.acct.LastName#, #obj.Map.acct.EmailAddress:VarChar:no_email@provided.com#
+ )
+ </insert>
+
</statements>
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/Complex.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/Complex.xml?rev=172603&r1=172602&r2=172603&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/Complex.xml (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/Complex.xml Sun May 22 16:56:20 2005
@@ -8,7 +8,16 @@
resultClass="int" >
select Account_ID from Accounts where Account_ID = #obj.Map.Id#
</statement>
-
+
+ <insert id="InsertComplexAccountViaInlineDefaultNull"
+ parameterClass="Hashtable" >
+ insert into Accounts
+ (Account_ID, Account_FirstName, Account_LastName, Account_Email)
+ values
+ (#obj.Map.acct.Id#, #obj.Map.acct.FirstName#, #obj.Map.acct.LastName#, #obj.Map.acct.EmailAddress:Text:no_email@provided.com#
+ )
+ </insert>
+
</statements>
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ComplexTypeTest.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ComplexTypeTest.cs?rev=172603&r1=172602&r2=172603&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ComplexTypeTest.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ComplexTypeTest.cs Sun May 22 16:56:20 2005
@@ -55,6 +55,26 @@
Assert.AreEqual(id, obj.Map["Id"]);
}
+ /// <summary>
+ /// Complex type insert inline default null test
+ /// </summary>
+ [Test]
+ public void TestInsertMapObjMapAcctInlineDefaultNull()
+ {
+ Hashtable map = new Hashtable();
+ Account acct = NewAccount6();
+ Complex obj = new Complex();
+ obj.Map = new Hashtable();
+ obj.Map.Add("acct", acct);
+ map.Add("obj", obj);
+
+ sqlMap.Insert("InsertComplexAccountViaInlineDefaultNull", map);
+
+ Account account = (Account) sqlMap.QueryForObject("GetAccountNullableEmail", 6);
+
+ AssertAccount6(account);
+ }
+
#endregion
Modified: incubator/ibatis/trunk/cs/to-do.txt
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/to-do.txt?rev=172603&r1=172602&r2=172603&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/to-do.txt (original)
+++ incubator/ibatis/trunk/cs/to-do.txt Sun May 22 16:56:20 2005
@@ -32,6 +32,7 @@
PostgreSQL/Npgsql 0.7
+ StatementGenerate.TestSelectByPK
+ Add Stored function NUnit tests
+ + Clean-up SqlMap files
Firebird/Firebird 1.7
+ ICloneable exception with no connectionstring