aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/NHibernate
diff options
context:
space:
mode:
authorMike Mazur2009-02-17 01:36:44 +0000
committerMike Mazur2009-02-17 01:36:44 +0000
commit76c0935ec744f2d230489398f879eb7f42b11d37 (patch)
treea68253554e3899f10b6c341db369ce4a029dfaa5 /OpenSim/Data/NHibernate
parentMajor change to how appearance is managed, including changes in login and use... (diff)
downloadopensim-SC_OLD-76c0935ec744f2d230489398f879eb7f42b11d37.zip
opensim-SC_OLD-76c0935ec744f2d230489398f879eb7f42b11d37.tar.gz
opensim-SC_OLD-76c0935ec744f2d230489398f879eb7f42b11d37.tar.bz2
opensim-SC_OLD-76c0935ec744f2d230489398f879eb7f42b11d37.tar.xz
- remove the Metadata property from AssetBase and return all previous
properties as before - prefix private variables with m_ in AssetBase.cs - related to Mantis #3122, as mentioned in https://lists.berlios.de/pipermail/opensim-dev/2009-February/005088.html - all services will likely need to be upgraded after this commit
Diffstat (limited to 'OpenSim/Data/NHibernate')
-rw-r--r--OpenSim/Data/NHibernate/NHibernateAssetData.cs6
-rw-r--r--OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml18
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>