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/08 22:07:12 UTC

svn commit: r169155 - in /incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypesHandler: BooleanTypeHandler.cs ByteTypeHandler.cs GuidTypeHandler.cs

Author: roberto
Date: Sun May  8 13:07:11 2005
New Revision: 169155

URL: http://svn.apache.org/viewcvs?rev=169155&view=rev
Log:
~Updated C# DataMapper typehandlers to handle Oracle provider shortcomings for Boolean, Byte, and Guid resultClass (can rollback these changes if needed)

Modified:
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypesHandler/BooleanTypeHandler.cs
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypesHandler/ByteTypeHandler.cs
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypesHandler/GuidTypeHandler.cs

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypesHandler/BooleanTypeHandler.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypesHandler/BooleanTypeHandler.cs?rev=169155&r1=169154&r2=169155&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypesHandler/BooleanTypeHandler.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypesHandler/BooleanTypeHandler.cs Sun May  8 13:07:11 2005
@@ -58,7 +58,7 @@
 			}
 			else
 			{
-				return dataReader.GetBoolean(index);
+				return Convert.ToBoolean(dataReader.GetValue(index));
 			}
 		}
 
@@ -70,7 +70,7 @@
 			}
 			else
 			{
-				return dataReader.GetBoolean(mapping.ColumnIndex);
+				return Convert.ToBoolean(dataReader.GetValue(mapping.ColumnIndex));
 			}
 		}
 

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypesHandler/ByteTypeHandler.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypesHandler/ByteTypeHandler.cs?rev=169155&r1=169154&r2=169155&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypesHandler/ByteTypeHandler.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypesHandler/ByteTypeHandler.cs Sun May  8 13:07:11 2005
@@ -54,7 +54,7 @@
 			}
 			else
 			{
-				return dataReader.GetByte(index);
+				return Convert.ToByte(dataReader.GetValue(index));
 			}
 		}
 
@@ -66,7 +66,7 @@
 			}
 			else
 			{
-				return dataReader.GetByte(mapping.ColumnIndex);
+				return Convert.ToByte(dataReader.GetValue(mapping.ColumnIndex));
 			}
 		}
 

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypesHandler/GuidTypeHandler.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypesHandler/GuidTypeHandler.cs?rev=169155&r1=169154&r2=169155&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypesHandler/GuidTypeHandler.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypesHandler/GuidTypeHandler.cs Sun May  8 13:07:11 2005
@@ -53,7 +53,7 @@
 			}
 			else
 			{
-				return dataReader.GetGuid(index);
+				return new Guid(dataReader.GetGuid(index).ToString());
 			}
 		}
 
@@ -65,7 +65,7 @@
 			}
 			else
 			{
-				return dataReader.GetGuid(mapping.ColumnIndex);
+				return new Guid(dataReader.GetValue(mapping.ColumnIndex).ToString());
 			}
 		}