aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-02-09 17:31:03 +0000
committerJustin Clarke Casey2009-02-09 17:31:03 +0000
commiteddcf620d874263b7fccc07623a4d37e7478532a (patch)
tree8ce37cec75731399db87795f0fbea9f1553f1bdb
parent* Apply http://opensimulator.org/mantis/view.php?id=3094 (diff)
downloadopensim-SC_OLD-eddcf620d874263b7fccc07623a4d37e7478532a.zip
opensim-SC_OLD-eddcf620d874263b7fccc07623a4d37e7478532a.tar.gz
opensim-SC_OLD-eddcf620d874263b7fccc07623a4d37e7478532a.tar.bz2
opensim-SC_OLD-eddcf620d874263b7fccc07623a4d37e7478532a.tar.xz
* Apply http://opensimulator.org/mantis/view.php?id=3080
* Changes the NHibernate asset mapping and expose FullID on AssetBase for NHibernate * mikem has seen this patch :)
-rw-r--r--OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml12
-rw-r--r--OpenSim/Framework/AssetBase.cs9
2 files changed, 16 insertions, 5 deletions
diff --git a/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml b/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml
index 7c42609..db400ea 100644
--- a/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml
+++ b/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml
@@ -4,11 +4,13 @@
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" />
12 <property name="Data" type="binary" /> 7 <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>
13 </class> 15 </class>
14</hibernate-mapping> 16</hibernate-mapping>
diff --git a/OpenSim/Framework/AssetBase.cs b/OpenSim/Framework/AssetBase.cs
index f9c9457..88ac4a6 100644
--- a/OpenSim/Framework/AssetBase.cs
+++ b/OpenSim/Framework/AssetBase.cs
@@ -61,6 +61,15 @@ namespace OpenSim.Framework
61 get { return _metadata; } 61 get { return _metadata; }
62 set { _metadata = value; } 62 set { _metadata = value; }
63 } 63 }
64
65 // We expose FullID here because the NHibernate mappers require a
66 // property on the AssetBase class for its primary key (see
67 // OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml).
68 public UUID FullID
69 {
70 get { return Metadata.FullID; }
71 set { Metadata.FullID = value; }
72 }
64 } 73 }
65 74
66 [Serializable] 75 [Serializable]