aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/NHibernate/UInt16Type.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-02-19 18:31:45 +0000
committerJustin Clarke Casey2009-02-19 18:31:45 +0000
commit631e10f269210cc352acc453fe04f56343c73360 (patch)
treeaa38818eb01549179f0f90322b8cd5c0a249c5d1 /OpenSim/Data/NHibernate/UInt16Type.cs
parent* It think it actually works now. Only that AssetService weirdness left to fix. (diff)
downloadopensim-SC_OLD-631e10f269210cc352acc453fe04f56343c73360.zip
opensim-SC_OLD-631e10f269210cc352acc453fe04f56343c73360.tar.gz
opensim-SC_OLD-631e10f269210cc352acc453fe04f56343c73360.tar.bz2
opensim-SC_OLD-631e10f269210cc352acc453fe04f56343c73360.tar.xz
* Apply http://opensimulator.org/mantis/view.php?id=3151
* Fixes NHibernate overflow exception when saving some objects (under at least PostgreSQL 8.3) * Thanks Tommil!
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/NHibernate/UInt16Type.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Data/NHibernate/UInt16Type.cs b/OpenSim/Data/NHibernate/UInt16Type.cs
index 907e832..05b9ce6 100644
--- a/OpenSim/Data/NHibernate/UInt16Type.cs
+++ b/OpenSim/Data/NHibernate/UInt16Type.cs
@@ -73,7 +73,7 @@ namespace OpenSim.Data.NHibernate
73 int ord = rs.GetOrdinal(names[0]); 73 int ord = rs.GetOrdinal(names[0]);
74 if (!rs.IsDBNull(ord)) 74 if (!rs.IsDBNull(ord))
75 { 75 {
76 uint1 = (UInt16)rs.GetInt16(ord); 76 uint1 = (UInt16)rs.GetInt32(ord);
77 } 77 }
78 78
79 return uint1; 79 return uint1;
@@ -82,7 +82,7 @@ namespace OpenSim.Data.NHibernate
82 public void NullSafeSet(IDbCommand cmd, object obj, int index) 82 public void NullSafeSet(IDbCommand cmd, object obj, int index)
83 { 83 {
84 UInt16 uint1 = (UInt16)obj; 84 UInt16 uint1 = (UInt16)obj;
85 ((IDataParameter)cmd.Parameters[index]).Value = Convert.ToInt16(uint1); 85 ((IDataParameter)cmd.Parameters[index]).Value = Convert.ToInt32(uint1);
86 } 86 }
87 87
88 public object Replace(object original, object target, object owner) 88 public object Replace(object original, object target, object owner)
@@ -97,7 +97,7 @@ namespace OpenSim.Data.NHibernate
97 97
98 public SqlType[] SqlTypes 98 public SqlType[] SqlTypes
99 { 99 {
100 get { return new SqlType [] { NHibernateUtil.Int16.SqlType }; } 100 get { return new SqlType [] { NHibernateUtil.Int32.SqlType }; }
101 } 101 }
102 } 102 }
103} 103}