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 2006/02/23 20:27:28 UTC

svn commit: r380205 [1/2] - in /ibatis/trunk/cs/mapper: ./ IBatisNet.Common/Utilities/ IBatisNet.Common/Utilities/Proxy/ IBatisNet.DataMapper.Test/ IBatisNet.DataMapper.Test/Domain/ IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/ IBatisNet.DataMapper.Test/M...

Author: gbayon
Date: Thu Feb 23 11:27:20 2006
New Revision: 380205

URL: http://svn.apache.org/viewcvs?rev=380205&view=rev
Log:
Added Support for nullable type in .NET V2

Added:
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/Nullable.cs   (with props)
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Nullable.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Nullable.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Nullable.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/Generics/NullableTest.cs   (with props)
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/Nullable-init.sql
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableBooleanTypeHandler.cs   (with props)
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableByteTypeHandler.cs   (with props)
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableCharTypeHandler.cs   (with props)
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableDateTimeTypeHandler.cs   (with props)
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableDecimalTypeHandler.cs   (with props)
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableDoubleTypeHandler.cs   (with props)
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableGuidTypeHandler.cs   (with props)
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableInt16TypeHandler.cs   (with props)
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableInt32TypeHandler.cs   (with props)
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableInt64TypeHandler.cs   (with props)
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableSingleTypeHandler.cs   (with props)
    ibatis/trunk/cs/mapper/providers.config
Modified:
    ibatis/trunk/cs/mapper/IBatisNet.2005.sln
    ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/Proxy/IProxyGenerator.cs
    ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/ScriptRunner.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/CustomInheritance.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/GuidStringTypeHandlerCallback.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/HundredsTypeHandlerCallback.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/OneZeroBoolTypeHandlerCallback.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/OuiNonBoolTypeHandlerCallback.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.2005.csproj
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.csproj
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Category.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/LineItem.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ParameterMapTest.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_Odbc.config
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_OleDb.config
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_SqlClient.config
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/providers.config
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/ChangeLog.txt
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/ResultProperty.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.20005.csproj
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/LazyLoadList.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/BaseTypeHandler.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/BooleanTypeHandler.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ByteArrayTypeHandler.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ByteTypeHandler.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/CharTypeHandler.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/CustomTypeHandler.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/DBNullTypeHandler.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/DateTimeTypeHandler.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/DecimalTypeHandler.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/DoubleTypeHandler.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/EnumTypeHandler.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/GuidTypeHandler.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ITypeHandler.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ITypeHandlerCallback.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Int16TypeHandler.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Int32TypeHandler.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Int64TypeHandler.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ObjectTypeHandler.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ParameterSetterImpl.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ResultGetterImpl.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/SingleTypeHandler.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/StringTypeHandler.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/TimeSpanTypeHandler.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/TypeHandlerFactory.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/UnknownTypeHandler.cs

Modified: ibatis/trunk/cs/mapper/IBatisNet.2005.sln
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.2005.sln?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.2005.sln (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.2005.sln Thu Feb 23 11:27:20 2006
@@ -20,6 +20,7 @@
 		External-Bin\Net\1.1\log4net.license.txt = External-Bin\Net\1.1\log4net.license.txt
 		External-Bin\Net\1.1\log4net.xml = External-Bin\Net\1.1\log4net.xml
 		External-Bin\Net\1.1\nunit.framework.dll = External-Bin\Net\1.1\nunit.framework.dll
+		providers.config = providers.config
 		External-Bin\Net\1.1\readme.txt = External-Bin\Net\1.1\readme.txt
 	EndProjectSection
 EndProject

Modified: ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/Proxy/IProxyGenerator.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/Proxy/IProxyGenerator.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/Proxy/IProxyGenerator.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/Proxy/IProxyGenerator.cs Thu Feb 23 11:27:20 2006
@@ -1,3 +1,28 @@
+#region Apache Notice
+/*****************************************************************************
+ * $Revision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ * 
+ * iBATIS.NET Data Mapper
+ * Copyright (C) 2004 - Gilles Bayon
+ *  
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ ********************************************************************************/
+#endregion
+
 using System;
 
 namespace IBatisNet.Common.Utilities.Proxy

Modified: ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/ScriptRunner.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/ScriptRunner.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/ScriptRunner.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/ScriptRunner.cs Thu Feb 23 11:27:20 2006
@@ -2,7 +2,7 @@
 #region Apache Notice
 /*****************************************************************************
  * $Header: $
- * $Revision: $
+ * $Revision$
  * $Date$
  * 
  * iBATIS.NET Data Mapper
@@ -123,12 +123,18 @@
 				}
 			}
 
-			try {
-				ExecuteStatements(dataSource, sqlStatements);
-			}
-			catch(System.Exception e) {
-				throw new IBatisNetException("Unable to execute the sql: " + fi.Name, e);
-			}
+            try
+            {
+                ExecuteStatements(dataSource, sqlStatements);
+            }
+            catch (System.Exception e)
+            {
+                throw new IBatisNetException("Unable to execute the sql: " + fi.Name, e);
+            }
+            finally
+            {
+                //
+            }
 		}
 
 		/// <summary>

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/CustomInheritance.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/CustomInheritance.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/CustomInheritance.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/CustomInheritance.cs Thu Feb 23 11:27:20 2006
@@ -42,6 +42,10 @@
 			throw new NotImplementedException(); 
 		}
 
+        public object NullValue
+        {
+            get { throw new InvalidCastException("CustomInheritance TypeHandlerCallback could not cast a null value in the field."); }
+        }
 		#endregion
 	}
 }

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/GuidStringTypeHandlerCallback.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/GuidStringTypeHandlerCallback.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/GuidStringTypeHandlerCallback.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/GuidStringTypeHandlerCallback.cs Thu Feb 23 11:27:20 2006
@@ -42,6 +42,10 @@
 			setter.Value = parameter.ToString();
 		}
 
+        public object NullValue
+        {
+            get { throw new InvalidCastException("GuidStringTypeHandlerCallback could not cast a null value in a guid field."); }
+        }
 		#endregion
 	}
 }

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/HundredsTypeHandlerCallback.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/HundredsTypeHandlerCallback.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/HundredsTypeHandlerCallback.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/HundredsTypeHandlerCallback.cs Thu Feb 23 11:27:20 2006
@@ -64,6 +64,10 @@
 			}		
 		}
 
+        public object NullValue
+        {
+            get { throw new InvalidCastException("HundredsTypeHandlerCallback could not cast a null value in the field."); }
+        }
 		#endregion
 	}
 }

Added: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/Nullable.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/Nullable.cs?rev=380205&view=auto
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/Nullable.cs (added)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/Nullable.cs Thu Feb 23 11:27:20 2006
@@ -0,0 +1,187 @@
+using System;
+#if dotnet2
+using System.Collections.Generic;
+#endif
+using System.Text;
+
+namespace IBatisNet.DataMapper.Test.Domain
+{
+    class NullableClass
+    {
+
+#if dotnet2
+        private int _id = int.MinValue;
+        private bool? _testBool = null;
+        private byte? _testByte = null;
+        private char? _testChar = null;
+        private DateTime? _testDateTime = null;
+        private decimal? _testDecimal = null;
+        private double? _testDouble = null;
+        private Guid? _testGuid = null;
+        private Int16? _testInt16 = null;
+        private Int32? _testInt32 = null;
+        private Int64? _testInt64 = null;
+        private Single? _testSingle = null;
+
+        public int Id
+        {
+            get { return _id; }
+            set { _id = value; }
+        }
+
+        public bool? TestBool
+        {
+            get { return _testBool; }
+            set { _testBool = value; }
+        }
+
+        public byte? TestByte
+        {
+            get { return _testByte; }
+            set { _testByte = value; }
+        }
+
+        public char? TestChar
+        {
+            get { return _testChar; }
+            set { _testChar = value; }
+        }
+
+        public DateTime? TestDateTime
+        {
+            get { return _testDateTime; }
+            set { _testDateTime = value; }
+        }
+
+        public decimal? TestDecimal
+        {
+            get { return _testDecimal; }
+            set { _testDecimal = value; }
+        }
+
+        public double? TestDouble
+        {
+            get { return _testDouble; }
+            set { _testDouble = value; }
+        }
+
+        public Guid? TestGuid
+        {
+            get { return _testGuid; }
+            set { _testGuid = value; }
+        }
+
+        public Int16? TestInt16
+        {
+            get { return _testInt16; }
+            set { _testInt16 = value; }
+        }
+
+        public Int32? TestInt32
+        {
+            get { return _testInt32; }
+            set { _testInt32 = value; }
+        }
+
+        public Int64? TestInt64
+        {
+            get { return _testInt64; }
+            set { _testInt64 = value; }
+        }
+
+
+        public Single? TestSingle
+        {
+            get { return _testSingle; }
+            set { _testSingle = value; }
+        }  
+#else
+        private int _id = int.MinValue;
+        private bool _testBool = false;
+        private byte _testByte = 1;
+        private char _testChar = 'a';
+        private DateTime _testDateTime = DateTime.MinValue;
+        private decimal _testDecimal = 0;
+        private double _testDouble = 0;
+        private Guid _testGuid = Guid.NewGuid();
+        private Int16 _testInt16 = 0;
+        private Int32 _testInt32 = 0;
+        private Int64 _testInt64 = 0;
+        private Single _testSingle = 0;
+
+        public int Id
+        {
+            get { return _id; }
+            set { _id = value; }
+        }
+
+        public bool TestBool
+        {
+            get { return _testBool; }
+            set { _testBool = value; }
+        }
+
+        public byte TestByte
+        {
+            get { return _testByte; }
+            set { _testByte = value; }
+        }
+
+        public char TestChar
+        {
+            get { return _testChar; }
+            set { _testChar = value; }
+        }
+
+        public DateTime TestDateTime
+        {
+            get { return _testDateTime; }
+            set { _testDateTime = value; }
+        }
+
+        public decimal TestDecimal
+        {
+            get { return _testDecimal; }
+            set { _testDecimal = value; }
+        }
+
+        public double TestDouble
+        {
+            get { return _testDouble; }
+            set { _testDouble = value; }
+        }
+
+        public Guid TestGuid
+        {
+            get { return _testGuid; }
+            set { _testGuid = value; }
+        }
+
+        public Int16 TestInt16
+        {
+            get { return _testInt16; }
+            set { _testInt16 = value; }
+        }
+
+        public Int32 TestInt32
+        {
+            get { return _testInt32; }
+            set { _testInt32 = value; }
+        }
+
+        public Int64 TestInt64
+        {
+            get { return _testInt64; }
+            set { _testInt64 = value; }
+        }
+
+
+        public Single TestSingle
+        {
+            get { return _testSingle; }
+            set { _testSingle = value; }
+        }  
+#endif
+
+    }
+}

Propchange: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/Nullable.cs
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/Nullable.cs
------------------------------------------------------------------------------
    svn:keywords = Id LastChangedDate LastChangedBy

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/OneZeroBoolTypeHandlerCallback.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/OneZeroBoolTypeHandlerCallback.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/OneZeroBoolTypeHandlerCallback.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/OneZeroBoolTypeHandlerCallback.cs Thu Feb 23 11:27:20 2006
@@ -60,6 +60,10 @@
 			}			
 		}
 
+        public object NullValue
+        {
+            get { throw new InvalidCastException("OneZeroBoolTypeHandlerCallback could not cast a null value in a bool field."); }
+        }
 		#endregion
 	}
 }

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/OuiNonBoolTypeHandlerCallback.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/OuiNonBoolTypeHandlerCallback.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/OuiNonBoolTypeHandlerCallback.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Domain/OuiNonBoolTypeHandlerCallback.cs Thu Feb 23 11:27:20 2006
@@ -64,6 +64,10 @@
 			}			
 		}
 
+        public object NullValue
+        {
+            get { throw new InvalidCastException("OuiNonBoolTypeHandlerCallback could not cast a null value in the field."); }
+        }
 		#endregion
 	}
 }

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.2005.csproj
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.2005.csproj?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.2005.csproj (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.2005.csproj Thu Feb 23 11:27:20 2006
@@ -160,6 +160,7 @@
     <Compile Include="Domain\Newspaper.cs">
       <SubType>Code</SubType>
     </Compile>
+    <Compile Include="Domain\Nullable.cs" />
     <Compile Include="Domain\OneZeroBoolTypeHandlerCallback.cs">
       <SubType>Code</SubType>
     </Compile>
@@ -211,6 +212,7 @@
     <Compile Include="NUnit\SqlMapTests\DynamicTest.cs">
       <SubType>Code</SubType>
     </Compile>
+    <Compile Include="NUnit\SqlMapTests\Generics\NullableTest.cs" />
     <Compile Include="NUnit\SqlMapTests\Generics\ResultMapTest.cs" />
     <Compile Include="NUnit\SqlMapTests\Generics\ResultClassTest.cs" />
     <Compile Include="NUnit\SqlMapTests\Generics\StatementTest.cs" />
@@ -290,6 +292,7 @@
     <Content Include="Maps\MSSQL\Odbc\DynamicAccount.xml" />
     <Content Include="Maps\MSSQL\Odbc\Enumeration.xml" />
     <Content Include="Maps\MSSQL\Odbc\LineItem.xml" />
+    <Content Include="Maps\MSSQL\Odbc\Nullable.xml" />
     <Content Include="Maps\MSSQL\Odbc\Order.xml" />
     <Content Include="Maps\MSSQL\Odbc\Other.xml" />
     <Content Include="Maps\MSSQL\Odbc\ParameterClass.xml" />
@@ -301,6 +304,7 @@
     <Content Include="Maps\MSSQL\OleDb\DynamicAccount.xml" />
     <Content Include="Maps\MSSQL\OleDb\Enumeration.xml" />
     <Content Include="Maps\MSSQL\OleDb\LineItem.xml" />
+    <Content Include="Maps\MSSQL\OleDb\Nullable.xml" />
     <Content Include="Maps\MSSQL\OleDb\Order.xml" />
     <Content Include="Maps\MSSQL\OleDb\Other.xml" />
     <Content Include="Maps\MSSQL\OleDb\ParameterClass.xml" />
@@ -312,6 +316,7 @@
     <Content Include="Maps\MSSQL\SqlClient\EmbedParameter.xml" />
     <Content Include="Maps\MSSQL\SqlClient\Enumeration.xml" />
     <Content Include="Maps\MSSQL\SqlClient\LineItem.xml" />
+    <Content Include="Maps\MSSQL\SqlClient\Nullable.xml" />
     <Content Include="Maps\MSSQL\SqlClient\Order.xml" />
     <Content Include="Maps\MSSQL\SqlClient\Other.xml" />
     <Content Include="Maps\MSSQL\SqlClient\ParameterClass.xml" />
@@ -398,6 +403,7 @@
     <Content Include="Scripts\MSSQL\enumeration-init.sql" />
     <Content Include="Scripts\MSSQL\line-item-init.sql" />
     <Content Include="Scripts\MSSQL\more-account-records.sql" />
+    <Content Include="Scripts\MSSQL\Nullable-init.sql" />
     <Content Include="Scripts\MSSQL\order-init.sql" />
     <Content Include="Scripts\MSSQL\other-init.sql" />
     <Content Include="Scripts\MSSQL\ps_SelectAccount.sql" />

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.csproj
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.csproj?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.csproj (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.csproj Thu Feb 23 11:27:20 2006
@@ -293,6 +293,11 @@
                     BuildAction = "Compile"
                 />
                 <File
+                    RelPath = "Domain\Nullable.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
                     RelPath = "Domain\OneZeroBoolTypeHandlerCallback.cs"
                     SubType = "Code"
                     BuildAction = "Compile"

Added: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Nullable.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Nullable.xml?rev=380205&view=auto
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Nullable.xml (added)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Nullable.xml Thu Feb 23 11:27:20 2006
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<sqlMap namespace="Nullable" 
+xmlns="http://ibatis.apache.org/mapping" 
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+  <alias>
+    <typeAlias alias="Nullable" type="IBatisNet.DataMapper.Test.Domain.NullableClass, IBatisNet.DataMapper.Test"/>
+  </alias>
+
+  <resultMaps>
+    <resultMap id="Nullable-result" class="Nullable">
+      <result property="Id" column="Id"/>
+      <result property="TestBool" column="TestBool" />
+      <result property="TestByte" column="TestByte" />
+      <result property="TestChar" column="TestChar" />
+      <result property="TestDateTime" column="TestDateTime" />
+      <result property="TestDecimal" column="TestDecimal" />
+      <result property="TestDouble" column="TestDouble" />
+      <result property="TestGuid" column="TestGuid"/>
+      <result property="TestInt16" column="TestInt16"/>
+      <result property="TestInt32" column="TestInt32"/>
+      <result property="TestInt64" column="TestInt64"/>
+      <result property="TestSingle" column="TestSingle" />
+    </resultMap>
+  </resultMaps >
+
+  <statements>
+
+    <select id="GetNullable" resultMap="Nullable-result" >
+      select
+      *
+      from Nullable
+      where Id = #value#
+    </select>
+
+
+    <insert id="InsertNullable" parameterClass="Nullable" >
+      <selectKey property="Id" type="post" resultClass="int">
+        select SCOPE_IDENTITY() as value
+      </selectKey>
+      insert into Nullable
+      (TestBool, TestByte, TestChar, TestDateTime, TestDecimal, TestDouble, TestGuid, TestInt16, TestInt32, TestInt64, TestSingle)
+      values
+      (#TestBool#, #TestByte#, #TestChar#, #TestDateTime#, #TestDecimal#, #TestDouble#, #TestGuid#, #TestInt16#, #TestInt32#, #TestInt64#, #TestSingle#)
+    </insert>
+
+  </statements>
+</sqlMap>

Added: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Nullable.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Nullable.xml?rev=380205&view=auto
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Nullable.xml (added)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Nullable.xml Thu Feb 23 11:27:20 2006
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<sqlMap namespace="Nullable" 
+xmlns="http://ibatis.apache.org/mapping" 
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+  <alias>
+    <typeAlias alias="Nullable" type="IBatisNet.DataMapper.Test.Domain.NullableClass, IBatisNet.DataMapper.Test"/>
+  </alias>
+
+  <resultMaps>
+    <resultMap id="Nullable-result" class="Nullable">
+      <result property="Id" column="Id"/>
+      <result property="TestBool" column="TestBool" />
+      <result property="TestByte" column="TestByte" />
+      <result property="TestChar" column="TestChar" />
+      <result property="TestDateTime" column="TestDateTime" />
+      <result property="TestDecimal" column="TestDecimal" />
+      <result property="TestDouble" column="TestDouble" />
+      <result property="TestGuid" column="TestGuid"/>
+      <result property="TestInt16" column="TestInt16"/>
+      <result property="TestInt32" column="TestInt32"/>
+      <result property="TestInt64" column="TestInt64"/>
+      <result property="TestSingle" column="TestSingle" />
+    </resultMap>
+  </resultMaps >
+
+  <statements>
+
+    <select id="GetNullable" resultMap="Nullable-result" >
+      select
+      *
+      from Nullable
+      where Id = #value#
+    </select>
+
+
+    <insert id="InsertNullable" parameterClass="Nullable" >
+      <selectKey property="Id" type="post" resultClass="int">
+        select SCOPE_IDENTITY() as value
+      </selectKey>
+      insert into Nullable
+      (TestBool, TestByte, TestChar, TestDateTime, TestDecimal, TestDouble, TestGuid, TestInt16, TestInt32, TestInt64, TestSingle)
+      values
+      (#TestBool#, #TestByte#, #TestChar#, #TestDateTime#, #TestDecimal#, #TestDouble#, #TestGuid#, #TestInt16#, #TestInt32#, #TestInt64#, #TestSingle#)
+    </insert>
+
+  </statements>
+</sqlMap>

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Category.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Category.xml?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Category.xml (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Category.xml Thu Feb 23 11:27:20 2006
@@ -6,9 +6,26 @@
 	<alias>
 		<typeAlias alias="Category" type="IBatisNet.DataMapper.Test.Domain.Category, IBatisNet.DataMapper.Test"/>
 	</alias>
-	
-	<statements>
-	
+
+  <resultMaps>
+    <resultMap id="Category-result" class="Category">
+      <result property="Id" column="Category_ID"/>
+      <result property="Name" column="Category_Name"/>
+      <result property="Guid" column="Category_Guid" nullValue="00000000-0000-0000-0000-000000000000"/>
+    </resultMap>
+  </resultMaps >
+  
+  <statements>
+
+    <select id="GetCategoryWithNullValueReplacementGuid" resultMap="Category-result" >
+      select
+      Category_ID,
+      Category_Name,
+      Category_Guid
+      from Categories
+      where Category_ID = #value#
+    </select>
+    
 		<select id="GetCategory" parameterClass="Integer" resultClass="Category">
 			select
 			Category_ID as Id,

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/LineItem.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/LineItem.xml?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/LineItem.xml (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/LineItem.xml Thu Feb 23 11:27:20 2006
@@ -18,14 +18,14 @@
 			<result property="Id"			column="LineItem_ID"/>
 			<result property="Code"			column="LineItem_Code"/>
 			<result property="Quantity"		column="LineItem_Quantity"/>
-			<result property="Price"		column="LineItem_Price"/>
-		</resultMap>
-		
-		<resultMap id="LineItemWithNullReplacement" class="LineItem">
-			<result property="Id"			column="LineItem_ID"/>
-			<result property="Code"			column="LineItem_Code"/>
-			<result property="Quantity"		column="LineItem_Quantity"/>
-			<result property="Price"		column="LineItem_Price" nullValue="-77.77"/>
+			<result property="Price"		column="LineItem_Price" />
+    </resultMap>
+
+    <resultMap id="LineItemWithNullReplacement" class="LineItem">
+      <result property="Id"			column="LineItem_ID"/>
+      <result property="Code"			column="LineItem_Code"/>
+      <result property="Quantity"		column="LineItem_Quantity"/>
+      <result property="Price"		column="LineItem_Price" nullValue="-77.77" />
 		</resultMap>
 		
 	</resultMaps>  
@@ -191,7 +191,7 @@
 			<parameter property="Order.Id" />
 			<parameter property="Code" />			
 			<parameter property="Quantity" />
-			<parameter property="Price" dbType="Decimal" nullValue="-99.99"/>
+			<parameter property="Price" dbType="Decimal" />
 			<parameter property="PictureData" dbType="Image" />
 		</parameterMap>
 		

Added: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Nullable.xml
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Nullable.xml?rev=380205&view=auto
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Nullable.xml (added)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Nullable.xml Thu Feb 23 11:27:20 2006
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<sqlMap namespace="Nullable" 
+xmlns="http://ibatis.apache.org/mapping" 
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+  <alias>
+    <typeAlias alias="Nullable" type="IBatisNet.DataMapper.Test.Domain.NullableClass, IBatisNet.DataMapper.Test"/>
+  </alias>
+
+  <resultMaps>
+    <resultMap id="Nullable-result" class="Nullable">
+      <result property="Id" column="Id"/>
+      <result property="TestBool" column="TestBool" />
+      <result property="TestByte" column="TestByte" />
+      <result property="TestChar" column="TestChar" />
+      <result property="TestDateTime" column="TestDateTime" />
+      <result property="TestDecimal" column="TestDecimal" />
+      <result property="TestDouble" column="TestDouble" />
+      <result property="TestGuid" column="TestGuid"/>
+      <result property="TestInt16" column="TestInt16"/>
+      <result property="TestInt32" column="TestInt32"/>
+      <result property="TestInt64" column="TestInt64"/>
+      <result property="TestSingle" column="TestSingle" />
+    </resultMap>
+  </resultMaps >
+
+  <statements>
+
+    <select id="GetNullable" resultMap="Nullable-result" >
+      select
+        *
+      from Nullable
+      where Id = #value#
+    </select>
+
+
+    <insert id="InsertNullable" parameterClass="Nullable" >
+      <selectKey property="Id" type="post" resultClass="int">
+        select SCOPE_IDENTITY() as value
+      </selectKey>
+      insert into Nullable
+      (TestBool, TestByte, TestChar, TestDateTime, TestDecimal, TestDouble, TestGuid, TestInt16, TestInt32, TestInt64, TestSingle)
+      values
+      (#TestBool#, #TestByte#, #TestChar#, #TestDateTime#, #TestDecimal#, #TestDouble#, #TestGuid#, #TestInt16#, #TestInt32#, #TestInt64#, #TestSingle#)
+    </insert>
+    
+  </statements>
+</sqlMap>

Added: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/Generics/NullableTest.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/Generics/NullableTest.cs?rev=380205&view=auto
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/Generics/NullableTest.cs (added)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/Generics/NullableTest.cs Thu Feb 23 11:27:20 2006
@@ -0,0 +1,447 @@
+#if dotnet2
+using System;
+
+using NUnit.Framework;
+
+using IBatisNet.DataMapper.Test.Domain;
+
+namespace IBatisNet.DataMapper.Test.NUnit.SqlMapTests.Generics
+{
+    /// <summary>
+    /// Summary description for ResultClassTest.
+    /// </summary>
+    [TestFixture]
+    public class NullableTest : BaseTest
+    {
+        #region SetUp & TearDown
+
+        /// <summary>
+        /// SetUp
+        /// </summary>
+        [SetUp]
+        public void Init()
+        {
+            InitScript(sqlMap.DataSource, ScriptDirectory + "Nullable-init.sql");
+        }
+
+        /// <summary>
+        /// TearDown
+        /// </summary>
+        [TearDown]
+        public void Dispose()
+        {}
+
+        #endregion
+
+
+        #region bool
+        /// <summary>
+        /// Test nullable bool
+        /// </summary>
+        [Test]
+        public void TestNullableBool()
+        {
+            NullableClass clazz = new NullableClass();
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(1, clazz.Id);
+            Assert.IsNull(clazz.TestBool);
+        }
+
+        /// <summary>
+        /// Test not nullable bool
+        /// </summary>
+        [Test]
+        public void TestNotNullableBool()
+        {
+            NullableClass clazz = new NullableClass();
+            clazz.TestBool = false;
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(1, clazz.Id);
+            Assert.AreEqual(false, clazz.TestBool);
+        } 
+        #endregion
+
+        #region byte
+        /// <summary>
+        /// Test nullable byte
+        /// </summary>
+        [Test]
+        public void TestNullableByte()
+        {
+            NullableClass clazz = new NullableClass();
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(1, clazz.Id);
+            Assert.IsNull(clazz.TestByte);
+        }
+
+        /// <summary>
+        /// Test not nullable byte
+        /// </summary>
+        [Test]
+        public void TestNotNullableByte()
+        {
+            NullableClass clazz = new NullableClass();
+            clazz.TestByte = 155;
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(1, clazz.Id);
+            Assert.AreEqual(155, clazz.TestByte);
+        } 
+        #endregion
+
+        #region char
+        /// <summary>
+        /// Test nullable char
+        /// </summary>
+        [Test]
+        public void TestNullableChar()
+        {
+            NullableClass clazz = new NullableClass();
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(1, clazz.Id);
+            Assert.IsNull(clazz.TestChar);
+        }
+
+        /// <summary>
+        /// Test not nullable char
+        /// </summary>
+        [Test]
+        public void TestNotNullableChar()
+        {
+            NullableClass clazz = new NullableClass();
+            clazz.TestChar = 'a';
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(1, clazz.Id);
+            Assert.AreEqual('a', clazz.TestChar);
+        } 
+        #endregion
+
+        #region datetime
+        /// <summary>
+        /// Test nullable datetime
+        /// </summary>
+        [Test]
+        public void TestNullableDateTime()
+        {
+            NullableClass clazz = new NullableClass();
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(1, clazz.Id);
+            Assert.IsNull(clazz.TestDateTime);
+        }
+
+        /// <summary>
+        /// Test not nullable datetime
+        /// </summary>
+        [Test]
+        public void TestNotNullableDateTime()
+        {
+            NullableClass clazz = new NullableClass();
+            DateTime? date = new DateTime?(DateTime.Now);
+            clazz.TestDateTime = date;
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(1, clazz.Id);
+            Assert.AreEqual(date.Value.ToString(), clazz.TestDateTime.Value.ToString());
+        }
+        #endregion
+
+        #region decimal
+        /// <summary>
+        /// Test nullable decimal
+        /// </summary>
+        [Test]
+        public void TestNullableDecimal()
+        {
+            NullableClass clazz = new NullableClass();
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(clazz.Id, 1);
+            Assert.IsNull(clazz.TestDecimal);
+        }
+
+        /// <summary>
+        /// Test not nullable decimal
+        /// </summary>
+        [Test]
+        public void TestNotNullableDecimal()
+        {
+            NullableClass clazz = new NullableClass();
+            clazz.TestDecimal = 99.53M;
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(1, clazz.Id);
+            Assert.AreEqual(99.53M, clazz.TestDecimal);
+        }
+        #endregion
+
+        #region Double
+        /// <summary>
+        /// Test nullable Double
+        /// </summary>
+        [Test]
+        public void TestNullableDouble()
+        {
+            NullableClass clazz = new NullableClass();
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(clazz.Id, 1);
+            Assert.IsNull(clazz.TestDouble);
+        }
+
+        /// <summary>
+        /// Test not nullable Double
+        /// </summary>
+        [Test]
+        public void TestNotNullableDouble()
+        {
+            NullableClass clazz = new NullableClass();
+            clazz.TestDouble = 99.5125;
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(1, clazz.Id);
+            Assert.AreEqual(99.5125, clazz.TestDouble);
+        }
+        #endregion
+
+        #region Guid
+        /// <summary>
+        /// Test nullable Guid
+        /// </summary>
+        [Test]
+        public void TestNullableGuid()
+        {
+            NullableClass clazz = new NullableClass();
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(clazz.Id, 1);
+            Assert.IsNull(clazz.TestGuid);
+        }
+
+        /// <summary>
+        /// Test not nullable Guid
+        /// </summary>
+        [Test]
+        public void TestNotNullableGuid()
+        {
+            NullableClass clazz = new NullableClass();
+            Guid? guid = new Guid?(Guid.NewGuid());
+            clazz.TestGuid = guid;
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(1, clazz.Id);
+            Assert.AreEqual(guid, clazz.TestGuid);
+        }
+        #endregion
+
+        #region Int16
+        /// <summary>
+        /// Test nullable Int16
+        /// </summary>
+        [Test]
+        public void TestNullableInt16()
+        {
+            NullableClass clazz = new NullableClass();
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(clazz.Id, 1);
+            Assert.IsNull(clazz.TestInt16);
+        }
+
+        /// <summary>
+        /// Test not nullable Int16
+        /// </summary>
+        [Test]
+        public void TestNotNullableInt16()
+        {
+            NullableClass clazz = new NullableClass();
+            clazz.TestInt16 = 45;
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(1, clazz.Id);
+            Assert.AreEqual(45, clazz.TestInt16);
+        }
+        #endregion
+
+        #region int 32
+        /// <summary>
+        /// Test nullable int32
+        /// </summary>
+        [Test]
+        public void TestNullableInt32()
+        {
+            NullableClass clazz = new NullableClass();
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(clazz.Id, 1);
+            Assert.IsNull(clazz.TestInt32);
+        }
+
+        /// <summary>
+        /// Test not nullable int32
+        /// </summary>
+        [Test]
+        public void TestNotNullableInt32()
+        {
+            NullableClass clazz = new NullableClass();
+            clazz.TestInt32 = 99;
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(1, clazz.Id);
+            Assert.AreEqual(99, clazz.TestInt32);
+        } 
+        #endregion
+
+        #region Int64
+        /// <summary>
+        /// Test nullable Int64
+        /// </summary>
+        [Test]
+        public void TestNullableInt64()
+        {
+            NullableClass clazz = new NullableClass();
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(clazz.Id, 1);
+            Assert.IsNull(clazz.TestInt64);
+        }
+
+        /// <summary>
+        /// Test not nullable Int64
+        /// </summary>
+        [Test]
+        public void TestNotNullableInt64()
+        {
+            NullableClass clazz = new NullableClass();
+            clazz.TestInt64 = 1234567890123456789;
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(1, clazz.Id);
+            Assert.AreEqual(1234567890123456789, clazz.TestInt64);
+        }
+        #endregion
+
+        #region Single
+        /// <summary>
+        /// Test nullable Single
+        /// </summary>
+        [Test]
+        public void TestNullableSingle()
+        {
+            NullableClass clazz = new NullableClass();
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(clazz.Id, 1);
+            Assert.IsNull(clazz.TestSingle);
+        }
+
+        /// <summary>
+        /// Test not nullable Single
+        /// </summary>
+        [Test]
+        public void TestNotNullableSingle()
+        {
+            NullableClass clazz = new NullableClass();
+            clazz.TestSingle = 4578.46445454112f;
+
+            sqlMap.Insert("InsertNullable", clazz);
+            clazz = null;
+            clazz = sqlMap.QueryForObject<NullableClass>("GetNullable", 1);
+
+            Assert.IsNotNull(clazz);
+            Assert.AreEqual(1, clazz.Id);
+            Assert.AreEqual(4578.46445454112f, clazz.TestSingle);
+        }
+        #endregion
+    }
+}
+#endif
\ No newline at end of file

Propchange: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/Generics/NullableTest.cs
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/Generics/NullableTest.cs
------------------------------------------------------------------------------
    svn:keywords = Id LastChangedDate LastChangedBy

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ParameterMapTest.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ParameterMapTest.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ParameterMapTest.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ParameterMapTest.cs Thu Feb 23 11:27:20 2006
@@ -179,7 +179,7 @@
 			int key = (int)sqlMap.Insert("InsertCategoryNull", category);
 
 			Category categoryRead = null;
-			categoryRead = (Category) sqlMap.QueryForObject("GetCategory", key);
+            categoryRead = (Category)sqlMap.QueryForObject("GetCategoryWithNullValueReplacementGuid", key);
 
 			Assert.AreEqual(category.Name, categoryRead.Name);
 			Assert.AreEqual(category.Guid.ToString(), categoryRead.Guid.ToString());

Added: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/Nullable-init.sql
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/Nullable-init.sql?rev=380205&view=auto
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/Nullable-init.sql (added)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/Nullable-init.sql Thu Feb 23 11:27:20 2006
@@ -0,0 +1,25 @@
+use [IBatisNet]
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Nullable]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
+BEGIN
+	drop table [dbo].[Nullable]
+END
+
+CREATE TABLE [dbo].[Nullable] (
+	[Id] [int] IDENTITY (1, 1) NOT NULL ,
+	[TestBool] [Bit] NULL ,
+	[TestByte] [tinyint] NULL ,
+	[TestChar] [char] NULL ,
+	[TestDateTime] [datetime] NULL ,
+	[TestDecimal] decimal(9,2) NULL ,
+	[TestDouble] [float] NULL ,
+	[TestGuid] [UniqueIdentifier] NULL ,
+	[TestInt16] [SmallInt] NULL ,
+	[TestInt32] [int] NULL ,
+	[TestInt64] [bigint] NULL ,
+	[TestSingle] [real] NULL ,
+	CONSTRAINT [PK_Nullable] PRIMARY KEY  CLUSTERED 
+	(
+		[Id]
+	)  ON [PRIMARY] 
+) ON [PRIMARY]

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_Odbc.config
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_Odbc.config?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_Odbc.config (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_Odbc.config Thu Feb 23 11:27:20 2006
@@ -41,6 +41,7 @@
 		<sqlMap resource="../../Maps/MSSQL/Odbc/ParameterClass.xml"/>
 		<sqlMap resource="../../Maps/MSSQL/Odbc/ResultClass.xml"/>
 		<sqlMap resource="../../Maps/MSSQL/Odbc/Document.xml"/>
-	</sqlMaps>
+    <sqlMap resource="../../Maps/MSSQL/Odbc/Nullable.xml"/>
+  </sqlMaps>
 	
 </sqlMapConfig>

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_OleDb.config
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_OleDb.config?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_OleDb.config (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_OleDb.config Thu Feb 23 11:27:20 2006
@@ -40,6 +40,7 @@
 		<sqlMap resource="../../Maps/MSSQL/OleDb/ParameterClass.xml"/>
 		<sqlMap resource="../../Maps/MSSQL/OleDb/ResultClass.xml"/>
 		<sqlMap resource="../../Maps/MSSQL/OleDb/Document.xml"/>
-	</sqlMaps>
+    <sqlMap resource="../../Maps/MSSQL/OleDb/Nullable.xml"/>
+  </sqlMaps>
 	
 </sqlMapConfig>

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_SqlClient.config
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_SqlClient.config?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_SqlClient.config (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_SqlClient.config Thu Feb 23 11:27:20 2006
@@ -42,5 +42,6 @@
 		<sqlMap resource="../../Maps/MSSQL/SqlClient/ResultClass.xml"/>
 		<sqlMap resource="../../Maps/MSSQL/SqlClient/Document.xml"/>
 		<sqlMap resource="../../Maps/MSSQL/SqlClient/EmbedParameter.xml"/>
+		<sqlMap resource="../../Maps/MSSQL/SqlClient/Nullable.xml"/>
 	</sqlMaps>
 </sqlMapConfig>

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/providers.config
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/providers.config?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/providers.config (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/providers.config Thu Feb 23 11:27:20 2006
@@ -58,7 +58,8 @@
 <provider name="OleDb1.1" 
 	  description="OleDb, provider V1.0.5000.0 in framework .NET V1.1" 
 	  enabled="true"
-	  assemblyName="System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" connectionClass="System.Data.OleDb.OleDbConnection" 
+	  assemblyName="System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
+    connectionClass="System.Data.OleDb.OleDbConnection" 
 	  commandClass="System.Data.OleDb.OleDbCommand" 
 	  parameterClass="System.Data.OleDb.OleDbParameter" 
 	  parameterDbTypeClass="System.Data.OleDb.OleDbType" 
@@ -70,11 +71,28 @@
 	  useParameterPrefixInParameter="false" 
 	  parameterPrefix=""
     />
+  <provider name="OleDb2.0" 
+      description="OleDb, provider V2.0.0.0 in framework .NET V2" 
+      enabled="false"
+      assemblyName="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
+      connectionClass="System.Data.OleDb.OleDbConnection" 
+      commandClass="System.Data.OleDb.OleDbCommand" 
+      parameterClass="System.Data.OleDb.OleDbParameter" 
+      parameterDbTypeClass="System.Data.OleDb.OleDbType" 
+      parameterDbTypeProperty="OleDbType" 
+      dataAdapterClass="System.Data.OleDb.OleDbDataAdapter" 
+      commandBuilderClass="System.Data.OleDb.OleDbCommandBuilder" 
+      usePositionalParameters="true" 
+      useParameterPrefixInSql="false" 
+      useParameterPrefixInParameter="false" 
+      parameterPrefix=""
+    />  
 <provider 
 	name="Odbc1.1" 
 	description="Odbc, provider V1.0.5000.0 in framework .NET V1.1" 
 	enabled="true" 
-	assemblyName="System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" connectionClass="System.Data.Odbc.OdbcConnection" 
+	assemblyName="System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
+  connectionClass="System.Data.Odbc.OdbcConnection" 
 	commandClass="System.Data.Odbc.OdbcCommand" 
 	parameterClass="System.Data.Odbc.OdbcParameter" 
 	parameterDbTypeClass="System.Data.Odbc.OdbcType" 
@@ -85,6 +103,22 @@
 	useParameterPrefixInSql="false" 
 	useParameterPrefixInParameter="false" 
 	parameterPrefix="@"/>
+  <provider 
+    name="Odbc2.0" 
+    description="Odbc, provider V2.0.0.0 in framework .NET V2" 
+    enabled="false" 
+    assemblyName="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
+    connectionClass="System.Data.Odbc.OdbcConnection" 
+    commandClass="System.Data.Odbc.OdbcCommand" 
+    parameterClass="System.Data.Odbc.OdbcParameter" 
+    parameterDbTypeClass="System.Data.Odbc.OdbcType" 
+    parameterDbTypeProperty="OdbcType" 
+    dataAdapterClass="System.Data.Odbc.OdbcDataAdapter" 
+    commandBuilderClass="System.Data.Odbc.OdbcCommandBuilder" 
+    usePositionalParameters="true" 
+    useParameterPrefixInSql="false" 
+    useParameterPrefixInParameter="false" 
+    parameterPrefix="@"/>  
 <provider 
 	name="oracle9.2" 
 	description="Oracle, Oracle provider V9.2.0.401" 

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/ChangeLog.txt
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/ChangeLog.txt?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/ChangeLog.txt (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/ChangeLog.txt Thu Feb 23 11:27:20 2006
@@ -4,6 +4,7 @@
 1.4 - XX/XX/XXX
 ------------------------------
 - Added support for readOnly & serialize attribut on CacheModel
+- Added Support for nullable type in .NET V2
 - Added Support for .NET V2 and Generic
 	
 	public T QueryForObject<T>(string statementName, object parameterObject);

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/ResultProperty.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/ResultProperty.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/ResultProperty.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/ResultProperty.cs Thu Feb 23 11:27:20 2006
@@ -1,12 +1,12 @@
 
 #region Apache Notice
 /*****************************************************************************
- * $Header: $
- * $Revision: $
- * $Date$
+ * $Revision$
+ * $LastChangedDate$
+ * $LastChangedBy$
  * 
  * iBATIS.NET Data Mapper
- * Copyright (C) 2004 - Gilles Bayon
+ * Copyright (C) 2006/2005 - The Apache Software Foundation
  *  
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,7 +24,7 @@
  ********************************************************************************/
 #endregion
 
-#region Imports
+#region Using
 
 using System;
 using System.Collections;
@@ -330,12 +330,30 @@
 				}
 				else
 				{
-					value = null;
+                    value = _typeHandler.NullValue;
 				}			
 			}
 
 			return value;
 		}
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="value"></param>
+        /// <returns></returns>
+        public object TranslateValue(object value)
+        {
+            if (value == null)
+            {
+                return _typeHandler.NullValue;
+            }
+            else
+            {
+                return value;
+            }
+        }
+
 		#endregion
 	}
 

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.20005.csproj
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.20005.csproj?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.20005.csproj (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.20005.csproj Thu Feb 23 11:27:20 2006
@@ -558,6 +558,17 @@
     <Compile Include="TypeHandlers\ITypeHandlerCallback.cs">
       <SubType>Code</SubType>
     </Compile>
+    <Compile Include="TypeHandlers\Nullables\NullableBooleanTypeHandler.cs" />
+    <Compile Include="TypeHandlers\Nullables\NullableByteTypeHandler.cs" />
+    <Compile Include="TypeHandlers\Nullables\NullableCharTypeHandler.cs" />
+    <Compile Include="TypeHandlers\Nullables\NullableDateTimeTypeHandler.cs" />
+    <Compile Include="TypeHandlers\Nullables\NullableDecimalTypeHandler.cs" />
+    <Compile Include="TypeHandlers\Nullables\NullableDoubleTypeHandler.cs" />
+    <Compile Include="TypeHandlers\Nullables\NullableGuidTypeHandler.cs" />
+    <Compile Include="TypeHandlers\Nullables\NullableInt16TypeHandler.cs" />
+    <Compile Include="TypeHandlers\Nullables\NullableInt32TypeHandler.cs" />
+    <Compile Include="TypeHandlers\Nullables\NullableInt64TypeHandler.cs" />
+    <Compile Include="TypeHandlers\Nullables\NullableSingleTypeHandler.cs" />
     <Compile Include="TypeHandlers\ObjectTypeHandler.cs">
       <SubType>Code</SubType>
     </Compile>

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/LazyLoadList.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/LazyLoadList.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/LazyLoadList.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/LazyLoadList.cs Thu Feb 23 11:27:20 2006
@@ -2,7 +2,7 @@
 #region Apache Notice
 /*****************************************************************************
  * $Header: $
- * $Revision: $
+ * $Revision$
  * $Date$
  * 
  * iBATIS.NET Data Mapper
@@ -34,7 +34,9 @@
 using IBatisNet.Common.Utilities.Objects;
 using IBatisNet.Common.Utilities.Proxy;
 using IBatisNet.DataMapper.MappedStatements;
-
+#if dotnet2
+using System.Collections.Generic;
+#endif
 #endregion
 
 namespace IBatisNet.DataMapper
@@ -96,18 +98,44 @@
 		/// <param name="propertyName">The property's name which been proxified.</param>
 		/// <param name="target">The target object which contains the property proxydied.</param>
 		/// <returns>A proxy</returns>
-		internal static IList NewInstance(IMappedStatement mappedSatement, object param, object target,string propertyName)
+		internal static IList NewInstance(IMappedStatement mappedSatement, object param, object target, string propertyName)
 		{
 			object proxList = null;
 			IInterceptor handler = new LazyLoadList(mappedSatement, param, target, propertyName);
-
-			if (mappedSatement.Statement.ListClass != null)
+            Type listClassType = mappedSatement.Statement.ListClass;
+            if (listClassType != null)
 			{
-				proxList = ProxyGeneratorFactory.GetProxyGenerator().CreateProxy(typeof(IList), handler, mappedSatement.Statement.CreateInstanceOfListClass());
+#if dotnet2
+                if (listClassType.IsGenericType)
+                {
+                }
+                else
+                {
+#endif
+                    proxList = ProxyGeneratorFactory.GetProxyGenerator().CreateProxy(typeof(IList), handler, mappedSatement.Statement.CreateInstanceOfListClass());
+ #if dotnet2
+				}
+#endif
 			}
 			else
 			{
-				proxList = ProxyGeneratorFactory.GetProxyGenerator().CreateProxy(typeof(IList), handler, new ArrayList());
+#if dotnet2
+                if (ObjectProbe.GetPropertyInfoForSetter(target.GetType(), propertyName).GetType().IsGenericType)
+                {
+                    Type[] typeArgs = listClassType.GetGenericArguments();
+                    //Type elementType = postSelect.ResultProperty.PropertyInfo.PropertyType.GetGenericArguments()[0];
+                    Type definition = typeof(List<>);
+                    Type constructedType = definition.MakeGenericType(typeArgs);
+                    object list = Activator.CreateInstance(constructedType);
+                    proxList = ProxyGeneratorFactory.GetProxyGenerator().CreateProxy(typeof(IList), handler, list);
+                }
+                else
+                {
+#endif
+                    proxList = ProxyGeneratorFactory.GetProxyGenerator().CreateProxy(typeof(IList), handler, new ArrayList());
+ #if dotnet2
+                }
+#endif
 			}
 
 			return (IList) proxList;

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs Thu Feb 23 11:27:20 2006
@@ -2,7 +2,7 @@
 #region Apache Notice
 /*****************************************************************************
  * $Header: $
- * $Revision: $
+ * $Revision$
  * $Date$
  * 
  * iBATIS.NET Data Mapper
@@ -1303,11 +1303,10 @@
 					else if ( (mapping.PropertyInfo.PropertyType.GetInterface("IList") != null) || 
 						(mapping.PropertyInfo.PropertyType == typeof(IList)))
 					{
-						object values = null;
 
 						if (mapping.IsLazyLoad)
 						{
-							values = LazyLoadList.NewInstance(queryStatement, keys, target, mapping.PropertyName);
+							object values = LazyLoadList.NewInstance(queryStatement, keys, target, mapping.PropertyName);
 							ObjectProbe.SetPropertyValue( target, mapping.PropertyName, values);
 						}
 						else
@@ -1326,7 +1325,18 @@
                     else if ( mapping.PropertyInfo.PropertyType.IsGenericType && 
                               mapping.PropertyInfo.PropertyType.GetGenericTypeDefinition() == typeof(IList<>)) 
                     {
-                        postSelect.Method = ExecuteMethod.ExecuteQueryForGenericIList;
+                        if (mapping.IsLazyLoad)
+                        {
+                            object values = LazyLoadList.NewInstance(queryStatement, keys, target, mapping.PropertyName);
+                            ObjectProbe.SetPropertyValue(target, mapping.PropertyName, values);
+                        }
+                        else
+                        {
+                            if (mapping.PropertyInfo.PropertyType.GetGenericTypeDefinition() == typeof(IList<>))
+                            {
+                                postSelect.Method = ExecuteMethod.ExecuteQueryForGenericIList;
+                            }
+                        }
                     }
 #endif
                     else // The ResultProperty is map to a .Net object

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/BaseTypeHandler.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/BaseTypeHandler.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/BaseTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/BaseTypeHandler.cs Thu Feb 23 11:27:20 2006
@@ -1,12 +1,12 @@
 
 #region Apache Notice
 /*****************************************************************************
- * $Header: $
- * $Revision: $
- * $Date$
+ * $Revision$
+ * $LastChangedDate$
+ * $LastChangedBy$
  * 
  * iBATIS.NET Data Mapper
- * Copyright (C) 2004 - Gilles Bayon
+ * Copyright (C) 2006/2005 - The Apache Software Foundation
  *  
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -73,6 +73,14 @@
 		/// <param name="s">the String value</param>
 		/// <returns>the converted value</returns>
 		public abstract object ValueOf(Type type, string s);
+
+        /// <summary>
+        /// The null value for this type
+        /// </summary>
+        public virtual object NullValue 
+        {
+            get { return null; }
+        }
 
 		/// <summary>
 		///  Sets a parameter on a IDbCommand

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/BooleanTypeHandler.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/BooleanTypeHandler.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/BooleanTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/BooleanTypeHandler.cs Thu Feb 23 11:27:20 2006
@@ -1,12 +1,12 @@
 
 #region Apache Notice
 /*****************************************************************************
- * $Header: $
- * $Revision: $
- * $Date$
+ * $Revision$
+ * $LastChangedDate$
+ * $LastChangedBy$
  * 
  * iBATIS.NET Data Mapper
- * Copyright (C) 2004 - Gilles Bayon
+ * Copyright (C) 2006/2005 - The Apache Software Foundation
  *  
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -83,10 +83,7 @@
 
 		public override bool IsSimpleType
 		{
-			get
-			{
-				return true;
-			}
+			get { return true; }
 		}
 
 		public override object ValueOf(Type type, string s)
@@ -94,5 +91,9 @@
 			return Convert.ToBoolean(s);
 		}
 
+        //public override object NullValue
+        //{
+        //    get { throw new InvalidCastException("BooleanTypeHandler could not cast a null value in bool field."); }
+        //}
 	}
 }

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ByteArrayTypeHandler.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ByteArrayTypeHandler.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ByteArrayTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ByteArrayTypeHandler.cs Thu Feb 23 11:27:20 2006
@@ -1,12 +1,12 @@
 
 #region Apache Notice
 /*****************************************************************************
- * $Header: $
- * $Revision: $
- * $Date$
+ * $Revision$
+ * $LastChangedDate$
+ * $LastChangedBy$
  * 
  * iBATIS.NET Data Mapper
- * Copyright (C) 2004 - Gilles Bayon
+ * Copyright (C) 2006/2005 - The Apache Software Foundation
  *  
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -34,7 +34,6 @@
 using IBatisNet.DataMapper.Exceptions;
 #endregion
 
-
 namespace IBatisNet.DataMapper.TypeHandlers
 {
 	/// <summary>
@@ -42,8 +41,6 @@
 	/// </summary>
 	internal class ByteArrayTypeHandler : BaseTypeHandler
 	{
-
-
 		/// <summary>
 		/// 
 		/// </summary>
@@ -104,10 +101,12 @@
 
 		public override bool IsSimpleType
 		{
-			get
-			{
-				return true;
-			}
+			get { return true; }
 		}
+
+        //public override object NullValue
+        //{
+        //    get { return null; }
+        //}
 	}
 }

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ByteTypeHandler.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ByteTypeHandler.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ByteTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ByteTypeHandler.cs Thu Feb 23 11:27:20 2006
@@ -1,12 +1,12 @@
 
 #region Apache Notice
 /*****************************************************************************
- * $Header: $
- * $Revision: $
- * $Date$
+ * $Revision$
+ * $LastChangedDate$
+ * $LastChangedBy$
  * 
  * iBATIS.NET Data Mapper
- * Copyright (C) 2004 - Gilles Bayon
+ * Copyright (C) 2006/2005 - The Apache Software Foundation
  *  
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -34,7 +34,6 @@
 #endregion 
 
 
-
 namespace IBatisNet.DataMapper.TypeHandlers
 {
 	/// <summary>
@@ -88,10 +87,12 @@
 
 		public override bool IsSimpleType
 		{
-			get
-			{
-				return true;
-			}
+			get { return true; }
 		}
+
+        public override object NullValue
+        {
+            get { throw new InvalidCastException("ByteTypeHandler, could not cast a null value in byte field."); }
+        }
 	}
 }

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/CharTypeHandler.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/CharTypeHandler.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/CharTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/CharTypeHandler.cs Thu Feb 23 11:27:20 2006
@@ -1,12 +1,12 @@
 
 #region Apache Notice
 /*****************************************************************************
- * $Header: $
- * $Revision: $
- * $Date$
+ * $Revision$
+ * $LastChangedDate$
+ * $LastChangedBy$
  * 
  * iBATIS.NET Data Mapper
- * Copyright (C) 2004 - Gilles Bayon
+ * Copyright (C) 2006/2005 - The Apache Software Foundation
  *  
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -33,8 +33,6 @@
 using IBatisNet.DataMapper.Configuration.ResultMapping;
 #endregion 
 
-
-
 namespace IBatisNet.DataMapper.TypeHandlers
 {
 	/// <summary>
@@ -89,10 +87,12 @@
 
 		public override bool IsSimpleType
 		{
-			get
-			{
-				return true;
-			}
+			get { return true; }
 		}
+
+        //public override object NullValue
+        //{
+        //    get { throw new InvalidCastException("CharTypeHandler, could not cast a null value in char field."); }
+        //}
 	}
 }

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/CustomTypeHandler.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/CustomTypeHandler.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/CustomTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/CustomTypeHandler.cs Thu Feb 23 11:27:20 2006
@@ -1,11 +1,11 @@
 #region Apache Notice
 /*****************************************************************************
- * $Header: $
- * $Revision: $
- * $Date$
+ * $Revision$
+ * $LastChangedDate$
+ * $LastChangedBy$
  * 
  * iBATIS.NET Data Mapper
- * Copyright (C) 2004 - Gilles Bayon
+ * Copyright (C) 2006/2005 - The Apache Software Foundation
  *  
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -89,10 +89,12 @@
 
 		public override bool IsSimpleType
 		{
-			get
-			{
-				return true;
-			}
+			get { return true; }
 		}
+
+        public override object NullValue
+        {
+            get { return _callback.NullValue; }
+        }
 	}
 }

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/DBNullTypeHandler.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/DBNullTypeHandler.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/DBNullTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/DBNullTypeHandler.cs Thu Feb 23 11:27:20 2006
@@ -1,12 +1,12 @@
 
 #region Apache Notice
 /*****************************************************************************
- * $Header: $
- * $Revision: 378715 $
- * $Date: 2006-02-18 06:41:00 -0500 (Sat, 18 Feb 2006) $
+ * $Revision: 378879 $
+ * $LastChangedDate: 2006-02-19 12:37:22 +0100 (dim., 19 févr. 2006) $
+ * $LastChangedBy: gbayon $
  * 
  * iBATIS.NET Data Mapper
- * Copyright (C) 2004 - Gilles Bayon
+ * Copyright (C) 2006/2005 - The Apache Software Foundation
  *  
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -57,10 +57,7 @@
 
 		public override bool IsSimpleType
 		{
-			get
-			{
-				return false;
-			}
+			get { return false; }
 		}
 
 		public override object ValueOf(Type type, string s)
@@ -72,5 +69,10 @@
 		{
 			dataParameter.Value = DBNull.Value;
 		}
+
+        //public override object NullValue
+        //{
+        //    get { return null; }
+        //}
 	}
 }

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/DateTimeTypeHandler.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/DateTimeTypeHandler.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/DateTimeTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/DateTimeTypeHandler.cs Thu Feb 23 11:27:20 2006
@@ -1,12 +1,12 @@
 
 #region Apache Notice
 /*****************************************************************************
- * $Header: $
- * $Revision: $
- * $Date$
+ * $Revision$
+ * $LastChangedDate$
+ * $LastChangedBy$
  * 
  * iBATIS.NET Data Mapper
- * Copyright (C) 2004 - Gilles Bayon
+ * Copyright (C) 2006/2005 - The Apache Software Foundation
  *  
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -33,8 +33,6 @@
 using IBatisNet.DataMapper.Configuration.ResultMapping;
 #endregion 
 
-
-
 namespace IBatisNet.DataMapper.TypeHandlers
 {
 	/// <summary>
@@ -88,10 +86,12 @@
 
 		public override bool IsSimpleType
 		{
-			get
-			{
-				return true;
-			}
+			get { return true; }
 		}
+
+        //public override object NullValue
+        //{
+        //    get { throw new InvalidCastException("DateTimeTypeHandler could not cast a null value in DateTime field."); }
+        //}
 	}
 }

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/DecimalTypeHandler.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/DecimalTypeHandler.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/DecimalTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/DecimalTypeHandler.cs Thu Feb 23 11:27:20 2006
@@ -1,12 +1,12 @@
 
 #region Apache Notice
 /*****************************************************************************
- * $Header: $
- * $Revision: $
- * $Date$
+ * $Revision$
+ * $LastChangedDate$
+ * $LastChangedBy$
  * 
  * iBATIS.NET Data Mapper
- * Copyright (C) 2004 - Gilles Bayon
+ * Copyright (C) 2006/2005 - The Apache Software Foundation
  *  
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -33,8 +33,6 @@
 using IBatisNet.DataMapper.Configuration.ResultMapping;
 #endregion 
 
-
-
 namespace IBatisNet.DataMapper.TypeHandlers
 {
 	/// <summary>
@@ -42,9 +40,7 @@
 	/// </summary>
 	internal class DecimalTypeHandler : BaseTypeHandler
 	{
-
-
-		/// <summary>
+        /// <summary>
 		/// 
 		/// </summary>
 		/// <param name="mapping"></param>
@@ -79,7 +75,7 @@
 		public override object ValueOf(Type type, string s)
 		{
 			CultureInfo culture = new CultureInfo( "en-US" );
-			// nullValue decimal must be  in format ######.##
+			// value decimal must be  in format ######.##
 			// where . is separator for decimal
 			return decimal.Parse(s, culture);
 		}
@@ -92,10 +88,12 @@
 
 		public override bool IsSimpleType
 		{
-			get
-			{
-				return true;
-			}
+			get { return true; }
 		}
+
+        //public override object NullValue
+        //{
+        //    get { throw new InvalidCastException("DecimalTypeHandler could not cast a null value in decimal field."); }
+        //}
 	}
 }

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/DoubleTypeHandler.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/DoubleTypeHandler.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/DoubleTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/DoubleTypeHandler.cs Thu Feb 23 11:27:20 2006
@@ -1,12 +1,12 @@
 
 #region Apache Notice
 /*****************************************************************************
- * $Header: $
- * $Revision: $
- * $Date$
+ * $Revision$
+ * $LastChangedDate$
+ * $LastChangedBy$
  * 
  * iBATIS.NET Data Mapper
- * Copyright (C) 2004 - Gilles Bayon
+ * Copyright (C) 2006/2005 - The Apache Software Foundation
  *  
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -33,8 +33,6 @@
 using IBatisNet.DataMapper.Configuration.ResultMapping;
 #endregion 
 
-
-
 namespace IBatisNet.DataMapper.TypeHandlers
 {
 	/// <summary>
@@ -88,10 +86,12 @@
 
 		public override bool IsSimpleType
 		{
-			get
-			{
-				return true;
-			}
+			get { return true; }
 		}
-	}
+
+        //public override object NullValue
+        //{
+        //    get { throw new InvalidCastException("DoubleTypeHandler, could not cast a null value in double field."); }
+        //}
+    }
 }

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/EnumTypeHandler.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/EnumTypeHandler.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/EnumTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/EnumTypeHandler.cs Thu Feb 23 11:27:20 2006
@@ -1,12 +1,12 @@
 
 #region Apache Notice
 /*****************************************************************************
- * $Header: $
- * $Revision: $
- * $Date$
+ * $Revision$
+ * $LastChangedDate$
+ * $LastChangedBy$
  * 
  * iBATIS.NET Data Mapper
- * Copyright (C) 2004 - Gilles Bayon
+ * Copyright (C) 2006/2005 - The Apache Software Foundation
  *  
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -36,8 +36,6 @@
 using IBatisNet.DataMapper.Exceptions;
 #endregion 
 
-
-
 namespace IBatisNet.DataMapper.TypeHandlers
 {
 	/// <summary>
@@ -103,10 +101,12 @@
 
 		public override bool IsSimpleType
 		{
-			get
-			{
-				return true;
-			}
+			get { return true; }
 		}
+
+        //public override object NullValue
+        //{
+        //    get { throw new InvalidCastException("EnumTypeHandler, could not cast a null value in Enum field."); }
+        //}
 	}
 }

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/GuidTypeHandler.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/GuidTypeHandler.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/GuidTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/GuidTypeHandler.cs Thu Feb 23 11:27:20 2006
@@ -1,12 +1,12 @@
 
 #region Apache Notice
 /*****************************************************************************
- * $Header: $
- * $Revision: $
- * $Date$
+ * $Revision$
+ * $LastChangedDate$
+ * $LastChangedBy$
  * 
  * iBATIS.NET Data Mapper
- * Copyright (C) 2004 - Gilles Bayon
+ * Copyright (C) 2006/2005 - The Apache Software Foundation
  *  
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -33,8 +33,6 @@
 using IBatisNet.DataMapper.Configuration.ResultMapping;
 #endregion 
 
-
-
 namespace IBatisNet.DataMapper.TypeHandlers
 {
 	/// <summary>
@@ -87,10 +85,12 @@
 
 		public override bool IsSimpleType
 		{
-			get
-			{
-				return true;
-			}
+			get { return true; }
 		}
+
+        //public override object NullValue
+        //{
+        //    get { throw new InvalidCastException("GuidTypeHandler could not cast a null value in Guid field."); }
+        //}
 	}
 }

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ITypeHandler.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ITypeHandler.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ITypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ITypeHandler.cs Thu Feb 23 11:27:20 2006
@@ -1,12 +1,12 @@
 
 #region Apache Notice
 /*****************************************************************************
- * $Header: $
- * $Revision: $
- * $Date$
+ * $Revision$
+ * $LastChangedDate$
+ * $LastChangedBy$
  * 
  * iBATIS.NET Data Mapper
- * Copyright (C) 2004 - Gilles Bayon
+ * Copyright (C) 2006/2005 - The Apache Software Foundation
  *  
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -93,5 +93,10 @@
 		/// <param name="str">the other object as a String</param>
 		/// <returns>true if they are equal</returns>
 		 bool Equals(object obj, string str);
+
+        /// <summary>
+        /// The null value for this type
+        /// </summary>
+        object NullValue { get;}
 	}
 }

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ITypeHandlerCallback.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ITypeHandlerCallback.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ITypeHandlerCallback.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ITypeHandlerCallback.cs Thu Feb 23 11:27:20 2006
@@ -1,12 +1,12 @@
 
 #region Apache Notice
 /*****************************************************************************
- * $Header: $
- * $Revision: $
- * $Date$
+ * $Revision$
+ * $LastChangedDate$
+ * $LastChangedBy$
  * 
  * iBATIS.NET Data Mapper
- * Copyright (C) 2004 - Gilles Bayon
+ * Copyright (C) 2006/2005 - The Apache Software Foundation
  *  
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -78,5 +78,10 @@
 		/// <param name="s"></param>
 		/// <returns></returns>
 		object ValueOf(string s);
+
+        /// <summary>
+        /// The null value for this type
+        /// </summary>
+        object NullValue { get;}
 	}
 }

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Int16TypeHandler.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Int16TypeHandler.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Int16TypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Int16TypeHandler.cs Thu Feb 23 11:27:20 2006
@@ -1,12 +1,12 @@
 
 #region Apache Notice
 /*****************************************************************************
- * $Header: $
- * $Revision: $
- * $Date$
+ * $Revision$
+ * $LastChangedDate$
+ * $LastChangedBy$
  * 
  * iBATIS.NET Data Mapper
- * Copyright (C) 2004 - Gilles Bayon
+ * Copyright (C) 2006/2005 - The Apache Software Foundation
  *  
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -32,8 +32,6 @@
 
 #endregion 
 
-
-
 namespace IBatisNet.DataMapper.TypeHandlers
 {
 	/// <summary>
@@ -88,10 +86,12 @@
 
 		public override bool IsSimpleType
 		{
-			get
-			{
-				return true;
-			}
+			get { return true; }
 		}
+
+        //public override object NullValue
+        //{
+        //    get { throw new InvalidCastException("Int16TypeHandler could not cast a null value in int16 field."); }
+        //}
 	}
 }

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Int32TypeHandler.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Int32TypeHandler.cs?rev=380205&r1=380204&r2=380205&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Int32TypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Int32TypeHandler.cs Thu Feb 23 11:27:20 2006
@@ -1,12 +1,12 @@
 
 #region Apache Notice
 /*****************************************************************************
- * $Header: $
- * $Revision: $
- * $Date$
+ * $Revision$
+ * $LastChangedDate$
+ * $LastChangedBy$
  * 
  * iBATIS.NET Data Mapper
- * Copyright (C) 2004 - Gilles Bayon
+ * Copyright (C) 2006/2005 - The Apache Software Foundation
  *  
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -88,11 +88,12 @@
 
 		public override bool IsSimpleType
 		{
-			get
-			{
-				return true;
-			}
+			get { return true; }
 		}
 
+        //public override object NullValue
+        //{
+        //    get { throw new InvalidCastException("Int32TypeHandler could not cast a null value in int32 field."); }
+        //}
 	}
 }