|
From: <fab...@us...> - 2009-06-15 03:14:56
|
Revision: 4472
http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4472&view=rev
Author: fabiomaulo
Date: 2009-06-15 03:14:55 +0000 (Mon, 15 Jun 2009)
Log Message:
-----------
Unreported bug fix
Modified Paths:
--------------
trunk/nhibernate/src/NHibernate/SqlTypes/SqlTypeFactory.cs
trunk/nhibernate/src/NHibernate/Type/TypeFactory.cs
Modified: trunk/nhibernate/src/NHibernate/SqlTypes/SqlTypeFactory.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/SqlTypes/SqlTypeFactory.cs 2009-06-14 23:28:27 UTC (rev 4471)
+++ trunk/nhibernate/src/NHibernate/SqlTypes/SqlTypeFactory.cs 2009-06-15 03:14:55 UTC (rev 4472)
@@ -85,6 +85,11 @@
return GetTypeWithLen<StringSqlType>(length, l => new StringSqlType(l));
}
+ public static StringClobSqlType GetStringClob(int length)
+ {
+ return GetTypeWithLen<StringClobSqlType>(length, l => new StringClobSqlType(l));
+ }
+
[MethodImpl(MethodImplOptions.Synchronized)]
public static SqlType GetSqlType(DbType dbType, byte precision, byte scale)
{
Modified: trunk/nhibernate/src/NHibernate/Type/TypeFactory.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Type/TypeFactory.cs 2009-06-14 23:28:27 UTC (rev 4471)
+++ trunk/nhibernate/src/NHibernate/Type/TypeFactory.cs 2009-06-15 03:14:55 UTC (rev 4472)
@@ -182,11 +182,24 @@
getTypeDelegatesWithLength.Add(NHibernateUtil.BinaryBlob.Name,
l =>
GetType(NHibernateUtil.BinaryBlob, l, len => new BinaryBlobType(SqlTypeFactory.GetBinaryBlob(len))));
- getTypeDelegatesWithLength.Add(NHibernateUtil.Serializable.Name, GetSerializableType);
- getTypeDelegatesWithLength.Add(NHibernateUtil.String.Name, GetStringType);
- getTypeDelegatesWithLength.Add(NHibernateUtil.StringClob.Name, GetStringType);
- getTypeDelegatesWithLength.Add(NHibernateUtil.Class.Name, GetTypeType);
+ getTypeDelegatesWithLength.Add(NHibernateUtil.Serializable.Name,
+ l =>
+ GetType(NHibernateUtil.Serializable, l,
+ len => new SerializableType(typeof (object), SqlTypeFactory.GetBinary(len))));
+ getTypeDelegatesWithLength.Add(NHibernateUtil.String.Name,
+ l =>
+ GetType(NHibernateUtil.String, l, len => new StringType(SqlTypeFactory.GetString(len))));
+ getTypeDelegatesWithLength.Add(NHibernateUtil.StringClob.Name,
+ l =>
+ GetType(NHibernateUtil.StringClob, l,
+ len => new StringClobType(SqlTypeFactory.GetStringClob(len))));
+
+ getTypeDelegatesWithLength.Add(NHibernateUtil.Class.Name,
+ l =>
+ GetType(NHibernateUtil.Class, l, len => new TypeType(SqlTypeFactory.GetString(len))));
+
+
getTypeDelegatesWithPrecision.Add(NHibernateUtil.Decimal.Name,
(p, s) => GetType(NHibernateUtil.Decimal, p, s, st => new DecimalType(st)));
getTypeDelegatesWithPrecision.Add(NHibernateUtil.Currency.Name,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|