aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorSean Dague2008-06-19 21:20:23 +0000
committerSean Dague2008-06-19 21:20:23 +0000
commitc2e2997a999ba5bdaa0b598b1286ee73cc14e372 (patch)
treec5771ea4b4599320b5574db5256cbfc742189808 /OpenSim
parentMantis#1572. Thank you kindly, Lulurun for a patch that addresses: (diff)
downloadopensim-SC_OLD-c2e2997a999ba5bdaa0b598b1286ee73cc14e372.zip
opensim-SC_OLD-c2e2997a999ba5bdaa0b598b1286ee73cc14e372.tar.gz
opensim-SC_OLD-c2e2997a999ba5bdaa0b598b1286ee73cc14e372.tar.bz2
opensim-SC_OLD-c2e2997a999ba5bdaa0b598b1286ee73cc14e372.tar.xz
more work towards nhibernate working with mysql, not there yet,
but moving in the right direction.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/NHibernate/NHibernateAssetData.cs7
-rw-r--r--OpenSim/Data/NHibernate/NHibernateUserData.cs1
-rw-r--r--OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml4
-rw-r--r--OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml4
4 files changed, 9 insertions, 7 deletions
diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
index 5c691a7..db77942 100644
--- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
@@ -103,8 +103,9 @@ namespace OpenSim.Data.NHibernate
103 { 103 {
104 return session.Load(typeof(AssetBase), uuid) as AssetBase; 104 return session.Load(typeof(AssetBase), uuid) as AssetBase;
105 } 105 }
106 catch 106 catch (Exception e)
107 { 107 {
108 m_log.Error("[NHIBERNATE] issue loading asset", e);
108 return null; 109 return null;
109 } 110 }
110 } 111 }
@@ -114,6 +115,7 @@ namespace OpenSim.Data.NHibernate
114 { 115 {
115 if (!ExistsAsset(asset.FullID)) 116 if (!ExistsAsset(asset.FullID))
116 { 117 {
118 m_log.InfoFormat("[NHIBERNATE] inserting asset {0}", asset.FullID);
117 using (ISession session = factory.OpenSession()) 119 using (ISession session = factory.OpenSession())
118 { 120 {
119 using (ITransaction transaction = session.BeginTransaction()) 121 using (ITransaction transaction = session.BeginTransaction())
@@ -155,7 +157,8 @@ namespace OpenSim.Data.NHibernate
155 157
156 override public bool ExistsAsset(LLUUID uuid) 158 override public bool ExistsAsset(LLUUID uuid)
157 { 159 {
158 return (FetchAsset(uuid) != null) ? true : false; 160 m_log.InfoFormat("[NHIBERNATE] ExistsAsset: {0}", uuid);
161 return (FetchAsset(uuid) != null);
159 } 162 }
160 163
161 public void DeleteAsset(LLUUID uuid) 164 public void DeleteAsset(LLUUID uuid)
diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs
index a6ab2ac..2bec02c 100644
--- a/OpenSim/Data/NHibernate/NHibernateUserData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs
@@ -91,7 +91,6 @@ namespace OpenSim.Data.NHibernate
91 { 91 {
92 user = session.Load(typeof(UserProfileData), uuid) as UserProfileData; 92 user = session.Load(typeof(UserProfileData), uuid) as UserProfileData;
93 } 93 }
94 // BUG: CATCHALL IS BAD.
95 } 94 }
96 catch (Exception) {} 95 catch (Exception) {}
97 96
diff --git a/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml b/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml
index 261c136..60fc146 100644
--- a/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml
+++ b/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml
@@ -4,8 +4,8 @@
4 <id name="FullID" column="ID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"> 4 <id name="FullID" column="ID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" /> 5 <generator class="assigned" />
6 </id> 6 </id>
7 <property name="Type" type="Int16" /> 7 <property name="Type" type="System.SByte" />
8 <property name="InvType" type="Int16" /> 8 <property name="InvType" type="System.SByte" />
9 <property name="Name" type="String" length="64" /> 9 <property name="Name" type="String" length="64" />
10 <property name="Description" type="String" length="64" /> 10 <property name="Description" type="String" length="64" />
11 <property name="Local" type="boolean" /> 11 <property name="Local" type="boolean" />
diff --git a/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml b/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml
index cb83e2c..4003628 100644
--- a/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml
+++ b/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml
@@ -9,8 +9,8 @@
9 <property name="PasswordHash" type="String" length="32" /> 9 <property name="PasswordHash" type="String" length="32" />
10 <property name="PasswordSalt" type="String" length="32" /> 10 <property name="PasswordSalt" type="String" length="32" />
11 <property name="WebLoginKey" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 11 <property name="WebLoginKey" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" />
12 <property name="HomeRegionX" type="Int32" /> 12 <property name="HomeRegionX" type="System.UInt32" />
13 <property name="HomeRegionY" type="Int32" /> 13 <property name="HomeRegionY" type="System.UInt32" />
14 <property name="HomeLocationX" type="Single" /> 14 <property name="HomeLocationX" type="Single" />
15 <property name="HomeLocationY" type="Single" /> 15 <property name="HomeLocationY" type="Single" />
16 <property name="HomeLocationZ" type="Single" /> 16 <property name="HomeLocationZ" type="Single" />