From dd144e12ba7a92d4a92986ccaa66d63d410ef028 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 17 Jul 2008 18:59:06 +0000 Subject: git merge --- OpenSim/Data/NHibernate/NHibernateRegionData.cs | 30 +------------------------ 1 file changed, 1 insertion(+), 29 deletions(-) (limited to 'OpenSim/Data/NHibernate/NHibernateRegionData.cs') diff --git a/OpenSim/Data/NHibernate/NHibernateRegionData.cs b/OpenSim/Data/NHibernate/NHibernateRegionData.cs index 3ba3556..8ca0afe 100644 --- a/OpenSim/Data/NHibernate/NHibernateRegionData.cs +++ b/OpenSim/Data/NHibernate/NHibernateRegionData.cs @@ -26,7 +26,6 @@ */ using System; -using System.Collections; using System.Collections.Generic; using System.IO; using System.Reflection; @@ -113,33 +112,6 @@ namespace OpenSim.Data.NHibernate { return null; } - - private void SaveOrUpdate(SceneObjectPart p) - { - try - { - ICriteria criteria = session.CreateCriteria(typeof(SceneObjectPart)); - criteria.Add(Expression.Eq("UUID", p.UUID)); - if (criteria.List().Count < 1) - { - session.Save(p); - } - else if (criteria.List().Count == 1) - { - SceneObjectPart old = (SceneObjectPart)criteria.List()[0]; - session.Evict(old); - session.Update(p); - } - else - { - m_log.Error("Not unique"); - } - } - catch (Exception e) - { - m_log.Error("[NHIBERNATE] issue saving asset", e); - } - } /// /// Adds an object into region storage @@ -153,7 +125,7 @@ namespace OpenSim.Data.NHibernate foreach (SceneObjectPart part in obj.Children.Values) { m_log.InfoFormat("Storing part {0}", part.UUID); - SaveOrUpdate(part); + session.SaveOrUpdate(part); } session.Flush(); } -- cgit v1.1