more work towards nhibernate working with mysql, not there yet,
but moving in the right direction.0.6.0-stable
parent
786fd3534d
commit
c2e2997a99
|
@ -103,8 +103,9 @@ namespace OpenSim.Data.NHibernate
|
||||||
{
|
{
|
||||||
return session.Load(typeof(AssetBase), uuid) as AssetBase;
|
return session.Load(typeof(AssetBase), uuid) as AssetBase;
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
m_log.Error("[NHIBERNATE] issue loading asset", e);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -114,6 +115,7 @@ namespace OpenSim.Data.NHibernate
|
||||||
{
|
{
|
||||||
if (!ExistsAsset(asset.FullID))
|
if (!ExistsAsset(asset.FullID))
|
||||||
{
|
{
|
||||||
|
m_log.InfoFormat("[NHIBERNATE] inserting asset {0}", asset.FullID);
|
||||||
using (ISession session = factory.OpenSession())
|
using (ISession session = factory.OpenSession())
|
||||||
{
|
{
|
||||||
using (ITransaction transaction = session.BeginTransaction())
|
using (ITransaction transaction = session.BeginTransaction())
|
||||||
|
@ -155,7 +157,8 @@ namespace OpenSim.Data.NHibernate
|
||||||
|
|
||||||
override public bool ExistsAsset(LLUUID uuid)
|
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)
|
public void DeleteAsset(LLUUID uuid)
|
||||||
|
|
|
@ -91,7 +91,6 @@ namespace OpenSim.Data.NHibernate
|
||||||
{
|
{
|
||||||
user = session.Load(typeof(UserProfileData), uuid) as UserProfileData;
|
user = session.Load(typeof(UserProfileData), uuid) as UserProfileData;
|
||||||
}
|
}
|
||||||
// BUG: CATCHALL IS BAD.
|
|
||||||
}
|
}
|
||||||
catch (Exception) {}
|
catch (Exception) {}
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
<id name="FullID" column="ID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate">
|
<id name="FullID" column="ID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate">
|
||||||
<generator class="assigned" />
|
<generator class="assigned" />
|
||||||
</id>
|
</id>
|
||||||
<property name="Type" type="Int16" />
|
<property name="Type" type="System.SByte" />
|
||||||
<property name="InvType" type="Int16" />
|
<property name="InvType" type="System.SByte" />
|
||||||
<property name="Name" type="String" length="64" />
|
<property name="Name" type="String" length="64" />
|
||||||
<property name="Description" type="String" length="64" />
|
<property name="Description" type="String" length="64" />
|
||||||
<property name="Local" type="boolean" />
|
<property name="Local" type="boolean" />
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
<property name="PasswordHash" type="String" length="32" />
|
<property name="PasswordHash" type="String" length="32" />
|
||||||
<property name="PasswordSalt" type="String" length="32" />
|
<property name="PasswordSalt" type="String" length="32" />
|
||||||
<property name="WebLoginKey" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" />
|
<property name="WebLoginKey" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" />
|
||||||
<property name="HomeRegionX" type="Int32" />
|
<property name="HomeRegionX" type="System.UInt32" />
|
||||||
<property name="HomeRegionY" type="Int32" />
|
<property name="HomeRegionY" type="System.UInt32" />
|
||||||
<property name="HomeLocationX" type="Single" />
|
<property name="HomeLocationX" type="Single" />
|
||||||
<property name="HomeLocationY" type="Single" />
|
<property name="HomeLocationY" type="Single" />
|
||||||
<property name="HomeLocationZ" type="Single" />
|
<property name="HomeLocationZ" type="Single" />
|
||||||
|
|
Loading…
Reference in New Issue