From 1c9551eaaed5c35eb22075cbecbe24fe15343cbd Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 23 Jul 2008 22:14:37 +0000 Subject: [PATCH] few additional fixed to get prim inventory up on nhibernate --- OpenSim/Data/NHibernate/NHibernateRegionData.cs | 4 +++- .../NHibernate/Resources/MySQLDialect/003_RegionStore.sql | 1 - OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenSim/Data/NHibernate/NHibernateRegionData.cs b/OpenSim/Data/NHibernate/NHibernateRegionData.cs index 86a93f2224..52db32d68f 100644 --- a/OpenSim/Data/NHibernate/NHibernateRegionData.cs +++ b/OpenSim/Data/NHibernate/NHibernateRegionData.cs @@ -259,7 +259,9 @@ namespace OpenSim.Data.NHibernate { inventory.Add(i); } - p.RestoreInventoryItems(inventory); + + if (inventory.Count > 0) + p.RestoreInventoryItems(inventory); } foreach (SceneObjectGroup g in SOG.Values) { diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/003_RegionStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/003_RegionStore.sql index 2cf46b5e84..230e93c8d3 100644 --- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/003_RegionStore.sql +++ b/OpenSim/Data/NHibernate/Resources/MySQLDialect/003_RegionStore.sql @@ -2,7 +2,6 @@ BEGIN; CREATE TABLE `PrimItems` ( `InvType` int(11) default NULL, - `AssetType` int(11) default NULL, `Name` varchar(255) default NULL, `Description` varchar(255) default NULL, `CreationDate` bigint(20) default NULL, diff --git a/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml b/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml index ffaea514da..ef3ab9b4b5 100644 --- a/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml +++ b/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml @@ -116,7 +116,7 @@ - + @@ -131,6 +131,5 @@ - \ No newline at end of file