aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/NHibernate/NHibernateManager.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/NHibernate/NHibernateManager.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Data/NHibernate/NHibernateManager.cs b/OpenSim/Data/NHibernate/NHibernateManager.cs
index 51467da..26bc219 100644
--- a/OpenSim/Data/NHibernate/NHibernateManager.cs
+++ b/OpenSim/Data/NHibernate/NHibernateManager.cs
@@ -131,25 +131,25 @@ namespace OpenSim.Data.NHibernate
131 RunMigration(dialect, assembly, store); 131 RunMigration(dialect, assembly, store);
132 } 132 }
133 133
134 public object Load(Type type, UUID uuid) 134 public object Load(Type type, Object id)
135 { 135 {
136 using (IStatelessSession session = sessionFactory.OpenStatelessSession()) 136 using (IStatelessSession session = sessionFactory.OpenStatelessSession())
137 { 137 {
138 object obj = null; 138 object obj = null;
139 try 139 try
140 { 140 {
141 obj = session.Get(type.FullName, uuid); 141 obj = session.Get(type.FullName, id);
142 } 142 }
143 catch (Exception e) 143 catch (Exception e)
144 { 144 {
145 m_log.ErrorFormat("[NHIBERNATE] {0} of id {1} loading threw exception: "+ e.ToString(), type.Name, uuid); 145 m_log.ErrorFormat("[NHIBERNATE] {0} of id {1} loading threw exception: " + e.ToString(), type.Name, id);
146 } 146 }
147 return obj; 147 return obj;
148 } 148 }
149 149
150 } 150 }
151 151
152 public bool Save(object obj) 152 public object Insert(object obj)
153 { 153 {
154 try 154 try
155 { 155 {
@@ -157,16 +157,16 @@ namespace OpenSim.Data.NHibernate
157 { 157 {
158 using (ITransaction transaction=session.BeginTransaction()) 158 using (ITransaction transaction=session.BeginTransaction())
159 { 159 {
160 session.Insert(obj); 160 Object identifier=session.Insert(obj);
161 transaction.Commit(); 161 transaction.Commit();
162 return true; 162 return identifier;
163 } 163 }
164 } 164 }
165 } 165 }
166 catch (Exception e) 166 catch (Exception e)
167 { 167 {
168 m_log.Error("[NHIBERNATE] issue inserting object ", e); 168 m_log.Error("[NHIBERNATE] issue inserting object ", e);
169 return false; 169 return null;
170 } 170 }
171 } 171 }
172 172