From c2e2997a999ba5bdaa0b598b1286ee73cc14e372 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 19 Jun 2008 21:20:23 +0000 Subject: [PATCH] more work towards nhibernate working with mysql, not there yet, but moving in the right direction. --- OpenSim/Data/NHibernate/NHibernateAssetData.cs | 7 +++++-- OpenSim/Data/NHibernate/NHibernateUserData.cs | 1 - OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml | 4 ++-- OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs index 5c691a7a2a..db77942484 100644 --- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs +++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs @@ -103,8 +103,9 @@ namespace OpenSim.Data.NHibernate { return session.Load(typeof(AssetBase), uuid) as AssetBase; } - catch + catch (Exception e) { + m_log.Error("[NHIBERNATE] issue loading asset", e); return null; } } @@ -114,6 +115,7 @@ namespace OpenSim.Data.NHibernate { if (!ExistsAsset(asset.FullID)) { + m_log.InfoFormat("[NHIBERNATE] inserting asset {0}", asset.FullID); using (ISession session = factory.OpenSession()) { using (ITransaction transaction = session.BeginTransaction()) @@ -155,7 +157,8 @@ namespace OpenSim.Data.NHibernate override public bool ExistsAsset(LLUUID uuid) { - return (FetchAsset(uuid) != null) ? true : false; + m_log.InfoFormat("[NHIBERNATE] ExistsAsset: {0}", uuid); + return (FetchAsset(uuid) != null); } public void DeleteAsset(LLUUID uuid) diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs index a6ab2ace5a..2bec02c708 100644 --- a/OpenSim/Data/NHibernate/NHibernateUserData.cs +++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs @@ -91,7 +91,6 @@ namespace OpenSim.Data.NHibernate { user = session.Load(typeof(UserProfileData), uuid) as UserProfileData; } - // BUG: CATCHALL IS BAD. } catch (Exception) {} diff --git a/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml b/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml index 261c13667b..60fc146028 100644 --- a/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml +++ b/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml @@ -4,8 +4,8 @@ - - + + diff --git a/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml b/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml index cb83e2cd2c..4003628187 100644 --- a/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml +++ b/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml @@ -9,8 +9,8 @@ - - + +