aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/NHibernate/NHibernateAssetData.cs10
-rw-r--r--OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml2
-rw-r--r--OpenSim/Data/NHibernate/Resources/InventoryItemBase.xml10
-rw-r--r--OpenSim/Data/NHibernate/Types/LLUUIDType.cs4
4 files changed, 13 insertions, 13 deletions
diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
index 4f05855..cc018dd 100644
--- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
@@ -67,11 +67,11 @@ namespace OpenSim.Data.NHibernate
67 cfg.AddAssembly("OpenSim.Data.NHibernate"); 67 cfg.AddAssembly("OpenSim.Data.NHibernate");
68 68
69 HbmSerializer.Default.Validate = true; 69 HbmSerializer.Default.Validate = true;
70// using ( System.IO.MemoryStream stream = 70 using ( System.IO.MemoryStream stream =
71// HbmSerializer.Default.Serialize(System.Reflection.Assembly.GetExecutingAssembly())) 71 HbmSerializer.Default.Serialize(System.Reflection.Assembly.GetExecutingAssembly()))
72// cfg.AddInputStream(stream); 72 cfg.AddInputStream(stream);
73 73
74// new SchemaExport(cfg).Create(true, true); 74 // new SchemaExport(cfg).Create(true, true);
75 75
76 factory = cfg.BuildSessionFactory(); 76 factory = cfg.BuildSessionFactory();
77 } 77 }
@@ -80,7 +80,7 @@ namespace OpenSim.Data.NHibernate
80 { 80 {
81 using(ISession session = factory.OpenSession()) { 81 using(ISession session = factory.OpenSession()) {
82 try { 82 try {
83 return session.Load(typeof(AssetBase), uuid.ToString()) as AssetBase; 83 return session.Load(typeof(AssetBase), uuid) as AssetBase;
84 } catch { 84 } catch {
85 return null; 85 return null;
86 } 86 }
diff --git a/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml b/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml
index 71f498c..086fbc1 100644
--- a/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml
+++ b/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml
@@ -1,7 +1,7 @@
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="UUID" type="OpenSim.Data.NHibernate.LLUUIDString"> 4 <id name="FullID" column="UUID" type="OpenSim.Data.NHibernate.LLUUIDString, OpenSim.Data.NHibernate">
5 <generator class="assigned" /> 5 <generator class="assigned" />
6 </id> 6 </id>
7 <property name="Type" type="SByte" /> 7 <property name="Type" type="SByte" />
diff --git a/OpenSim/Data/NHibernate/Resources/InventoryItemBase.xml b/OpenSim/Data/NHibernate/Resources/InventoryItemBase.xml
index ba1dda4..dfbdf3e 100644
--- a/OpenSim/Data/NHibernate/Resources/InventoryItemBase.xml
+++ b/OpenSim/Data/NHibernate/Resources/InventoryItemBase.xml
@@ -1,15 +1,15 @@
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.InventoryItemBase, OpenSim.Framework" table="InventoryItems" lazy="false"> 3 <class name="OpenSim.Framework.InventoryItemBase, OpenSim.Framework" table="InventoryItems" lazy="false">
4 <id name="ID" type="OpenSim.Data.NHibernate.LLUUIDString"> 4 <id name="ID" type="OpenSim.Data.NHibernate.LLUUIDString, OpenSim.Data.NHibernate">
5 <generator class="assigned" /> 5 <generator class="assigned" />
6 </id> 6 </id>
7 <property name="InvType" type="int" /> 7 <property name="InvType" type="int" />
8 <property name="AssetType" type="int" /> 8 <property name="AssetType" type="int" />
9 <property name="AssetID" type="OpenSim.Data.NHibernate.LLUUIDString" /> 9 <property name="AssetID" type="OpenSim.Data.NHibernate.LLUUIDString, OpenSim.Data.NHibernate" />
10 <property name="Folder" type="OpenSim.Data.NHibernate.LLUUIDString" /> 10 <property name="Folder" type="OpenSim.Data.NHibernate.LLUUIDString, OpenSim.Data.NHibernate" />
11 <property name="Owner" type="OpenSim.Data.NHibernate.LLUUIDString" /> 11 <property name="Owner" type="OpenSim.Data.NHibernate.LLUUIDString, OpenSim.Data.NHibernate" />
12 <property name="Creator" type="OpenSim.Data.NHibernate.LLUUIDString" /> 12 <property name="Creator" type="OpenSim.Data.NHibernate.LLUUIDString, OpenSim.Data.NHibernate" />
13 <property name="Name" type="String" length="64" /> 13 <property name="Name" type="String" length="64" />
14 <property name="Description" type="String" length="64" /> 14 <property name="Description" type="String" length="64" />
15 <property name="NextPermissions" type="uint" /> 15 <property name="NextPermissions" type="uint" />
diff --git a/OpenSim/Data/NHibernate/Types/LLUUIDType.cs b/OpenSim/Data/NHibernate/Types/LLUUIDType.cs
index 21d3774..b8e5739 100644
--- a/OpenSim/Data/NHibernate/Types/LLUUIDType.cs
+++ b/OpenSim/Data/NHibernate/Types/LLUUIDType.cs
@@ -57,6 +57,7 @@ namespace OpenSim.Data.NHibernate
57 { 57 {
58 LLUUID UUID = (LLUUID)obj; 58 LLUUID UUID = (LLUUID)obj;
59 ((IDataParameter)cmd.Parameters[index]).Value = UUID.ToString(); 59 ((IDataParameter)cmd.Parameters[index]).Value = UUID.ToString();
60 System.Console.WriteLine("Setting UUID {0}", UUID.ToString());
60 } 61 }
61 62
62 public object Replace(object original, object target, object owner) 63 public object Replace(object original, object target, object owner)
@@ -71,8 +72,7 @@ namespace OpenSim.Data.NHibernate
71 72
72 public SqlType[] SqlTypes 73 public SqlType[] SqlTypes
73 { 74 {
74 // I think we're up to 36 75 get { return new SqlType [] { SqlTypeFactory.GetString(32) }; }
75 get { return new SqlType [] { SqlTypeFactory.GetString(36) }; }
76 } 76 }
77 } 77 }
78} 78}