diff options
Diffstat (limited to 'OpenSim/Data/NHibernate')
-rw-r--r-- | OpenSim/Data/NHibernate/NHibernateAssetData.cs | 6 | ||||
-rw-r--r-- | OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml | 18 |
2 files changed, 11 insertions, 13 deletions
diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs index 8f4877d..95595db 100644 --- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs +++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs | |||
@@ -64,7 +64,7 @@ namespace OpenSim.Data.NHibernate | |||
64 | 64 | ||
65 | private void Save(AssetBase asset) | 65 | private void Save(AssetBase asset) |
66 | { | 66 | { |
67 | AssetBase temp = (AssetBase)manager.Get(typeof(AssetBase), asset.Metadata.FullID); | 67 | AssetBase temp = (AssetBase)manager.Get(typeof(AssetBase), asset.FullID); |
68 | if (temp == null) | 68 | if (temp == null) |
69 | { | 69 | { |
70 | manager.Insert(asset); | 70 | manager.Insert(asset); |
@@ -73,13 +73,13 @@ namespace OpenSim.Data.NHibernate | |||
73 | 73 | ||
74 | override public void CreateAsset(AssetBase asset) | 74 | override public void CreateAsset(AssetBase asset) |
75 | { | 75 | { |
76 | m_log.InfoFormat("[NHIBERNATE] inserting asset {0}", asset.Metadata.FullID); | 76 | m_log.InfoFormat("[NHIBERNATE] inserting asset {0}", asset.FullID); |
77 | Save(asset); | 77 | Save(asset); |
78 | } | 78 | } |
79 | 79 | ||
80 | override public void UpdateAsset(AssetBase asset) | 80 | override public void UpdateAsset(AssetBase asset) |
81 | { | 81 | { |
82 | m_log.InfoFormat("[NHIBERNATE] updating asset {0}", asset.Metadata.FullID); | 82 | m_log.InfoFormat("[NHIBERNATE] updating asset {0}", asset.FullID); |
83 | manager.Update(asset); | 83 | manager.Update(asset); |
84 | } | 84 | } |
85 | 85 | ||
diff --git a/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml b/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml index db400ea..cb8b36d 100644 --- a/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml +++ b/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml | |||
@@ -1,16 +1,14 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | 1 | <?xml version="1.0" encoding="utf-8" ?> |
2 | <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> | 2 | <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> |
3 | <class name="OpenSim.Framework.AssetBase, OpenSim.Framework" table="Assets" lazy="false"> | 3 | <class name="OpenSim.Framework.AssetBase, OpenSim.Framework" table="Assets" lazy="false"> |
4 | <id name="FullID" column="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"> | 4 | <id name="FullID" column="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"> |
5 | <generator class="assigned" /> | 5 | <generator class="assigned" /> |
6 | </id> | 6 | </id> |
7 | <property name="Type" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" /> | ||
8 | <property name="Name" type="String" length="64" /> | ||
9 | <property name="Description" type="String" length="64" /> | ||
10 | <property name="Local" type="boolean" /> | ||
11 | <property name="Temporary" type="boolean" /> | ||
7 | <property name="Data" type="binary" /> | 12 | <property name="Data" type="binary" /> |
8 | <component name="Metadata"> | ||
9 | <property name="Type" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" /> | ||
10 | <property name="Name" type="String" length="64" /> | ||
11 | <property name="Description" type="String" length="64" /> | ||
12 | <property name="Local" type="boolean" /> | ||
13 | <property name="Temporary" type="boolean" /> | ||
14 | </component> | ||
15 | </class> | 13 | </class> |
16 | </hibernate-mapping> | 14 | </hibernate-mapping> |