diff options
author | Sean Dague | 2008-07-15 18:57:18 +0000 |
---|---|---|
committer | Sean Dague | 2008-07-15 18:57:18 +0000 |
commit | b5efb49d74919b991fe86b53692180cf4829b565 (patch) | |
tree | dced5c727097a1793f8c0ecd26cb614a3e832d51 /OpenSim/Data/NHibernate/NHibernateRegionData.cs | |
parent | * Expose client statistics to the console via 'show stats' (diff) | |
download | opensim-SC_OLD-b5efb49d74919b991fe86b53692180cf4829b565.zip opensim-SC_OLD-b5efb49d74919b991fe86b53692180cf4829b565.tar.gz opensim-SC_OLD-b5efb49d74919b991fe86b53692180cf4829b565.tar.bz2 opensim-SC_OLD-b5efb49d74919b991fe86b53692180cf4829b565.tar.xz |
added new ParentUUID property to map out from SOP.
Updated some nhibernate parts, started in on migration.
Diffstat (limited to 'OpenSim/Data/NHibernate/NHibernateRegionData.cs')
-rw-r--r-- | OpenSim/Data/NHibernate/NHibernateRegionData.cs | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/OpenSim/Data/NHibernate/NHibernateRegionData.cs b/OpenSim/Data/NHibernate/NHibernateRegionData.cs index a2caab1..1c9e363 100644 --- a/OpenSim/Data/NHibernate/NHibernateRegionData.cs +++ b/OpenSim/Data/NHibernate/NHibernateRegionData.cs | |||
@@ -52,7 +52,7 @@ namespace OpenSim.Data.NHibernate | |||
52 | 52 | ||
53 | private Configuration cfg; | 53 | private Configuration cfg; |
54 | private ISessionFactory factory; | 54 | private ISessionFactory factory; |
55 | //private ISession session; | 55 | private ISession session; |
56 | 56 | ||
57 | public void Initialise() | 57 | public void Initialise() |
58 | { | 58 | { |
@@ -89,11 +89,11 @@ namespace OpenSim.Data.NHibernate | |||
89 | cfg.AddInputStream(stream); | 89 | cfg.AddInputStream(stream); |
90 | 90 | ||
91 | factory = cfg.BuildSessionFactory(); | 91 | factory = cfg.BuildSessionFactory(); |
92 | //session = factory.OpenSession(); | 92 | session = factory.OpenSession(); |
93 | 93 | ||
94 | // This actually does the roll forward assembly stuff | 94 | // This actually does the roll forward assembly stuff |
95 | Assembly assem = GetType().Assembly; | 95 | Assembly assem = GetType().Assembly; |
96 | Migration m = new Migration((System.Data.Common.DbConnection)factory.ConnectionProvider.GetConnection(), assem, dialect, "AssetStore"); | 96 | Migration m = new Migration((System.Data.Common.DbConnection)factory.ConnectionProvider.GetConnection(), assem, dialect, "RegionStore"); |
97 | m.Update(); | 97 | m.Update(); |
98 | } | 98 | } |
99 | 99 | ||
@@ -119,7 +119,18 @@ namespace OpenSim.Data.NHibernate | |||
119 | /// <param name="regionUUID">the region UUID</param> | 119 | /// <param name="regionUUID">the region UUID</param> |
120 | public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) | 120 | public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) |
121 | { | 121 | { |
122 | //NHPrim[] prims = (NHPrim[]) obj.GetParts(); | 122 | foreach (SceneObjectPart part in obj.Children.Values) |
123 | { | ||
124 | try | ||
125 | { | ||
126 | session.SaveOrUpdate(part); | ||
127 | } | ||
128 | catch (Exception e) | ||
129 | { | ||
130 | m_log.Error("Can't save: ", e); | ||
131 | } | ||
132 | } | ||
133 | |||
123 | } | 134 | } |
124 | 135 | ||
125 | /// <summary> | 136 | /// <summary> |