more work towards nhibernate working with mysql, not there yet,

but moving in the right direction.
0.6.0-stable
Sean Dague 2008-06-19 21:20:23 +00:00
parent 786fd3534d
commit c2e2997a99
4 changed files with 9 additions and 7 deletions

View File

@ -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)

View File

@ -91,7 +91,6 @@ namespace OpenSim.Data.NHibernate
{
user = session.Load(typeof(UserProfileData), uuid) as UserProfileData;
}
// BUG: CATCHALL IS BAD.
}
catch (Exception) {}

View File

@ -4,8 +4,8 @@
<id name="FullID" column="ID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate">
<generator class="assigned" />
</id>
<property name="Type" type="Int16" />
<property name="InvType" type="Int16" />
<property name="Type" type="System.SByte" />
<property name="InvType" type="System.SByte" />
<property name="Name" type="String" length="64" />
<property name="Description" type="String" length="64" />
<property name="Local" type="boolean" />

View File

@ -9,8 +9,8 @@
<property name="PasswordHash" type="String" length="32" />
<property name="PasswordSalt" type="String" length="32" />
<property name="WebLoginKey" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" />
<property name="HomeRegionX" type="Int32" />
<property name="HomeRegionY" type="Int32" />
<property name="HomeRegionX" type="System.UInt32" />
<property name="HomeRegionY" type="System.UInt32" />
<property name="HomeLocationX" type="Single" />
<property name="HomeLocationY" type="Single" />
<property name="HomeLocationZ" type="Single" />