aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/NHibernate/NHibernateInventoryData.cs')
-rw-r--r--OpenSim/Data/NHibernate/NHibernateInventoryData.cs22
1 files changed, 11 insertions, 11 deletions
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
index f99273a..a004e29 100644
--- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
@@ -298,7 +298,7 @@ namespace OpenSim.Data.NHibernate
298 public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID) 298 public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID)
299 { 299 {
300 using(ISession session = factory.OpenSession()) { 300 using(ISession session = factory.OpenSession()) {
301 try { 301 // try {
302 ICriteria criteria = session.CreateCriteria(typeof(InventoryItemBase)); 302 ICriteria criteria = session.CreateCriteria(typeof(InventoryItemBase));
303 criteria.Add(Expression.Eq("Folder", folderID) ); 303 criteria.Add(Expression.Eq("Folder", folderID) );
304 List<InventoryItemBase> list = new List<InventoryItemBase>(); 304 List<InventoryItemBase> list = new List<InventoryItemBase>();
@@ -307,9 +307,9 @@ namespace OpenSim.Data.NHibernate
307 list.Add(item); 307 list.Add(item);
308 } 308 }
309 return list; 309 return list;
310 } catch { 310// } catch {
311 return new List<InventoryItemBase>(); 311// return new List<InventoryItemBase>();
312 } 312// }
313 } 313 }
314 } 314 }
315 315
@@ -322,7 +322,7 @@ namespace OpenSim.Data.NHibernate
322 public InventoryFolderBase getUserRootFolder(LLUUID user) 322 public InventoryFolderBase getUserRootFolder(LLUUID user)
323 { 323 {
324 using(ISession session = factory.OpenSession()) { 324 using(ISession session = factory.OpenSession()) {
325 try { 325 // try {
326 ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); 326 ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase));
327 criteria.Add(Expression.Eq("ParentID", LLUUID.Zero) ); 327 criteria.Add(Expression.Eq("ParentID", LLUUID.Zero) );
328 criteria.Add(Expression.Eq("Owner", user) ); 328 criteria.Add(Expression.Eq("Owner", user) );
@@ -332,9 +332,9 @@ namespace OpenSim.Data.NHibernate
332 } 332 }
333 m_log.ErrorFormat("No Inventory Root Folder Found for: {0}", user); 333 m_log.ErrorFormat("No Inventory Root Folder Found for: {0}", user);
334 return new InventoryFolderBase(); 334 return new InventoryFolderBase();
335 } catch { 335// } catch {
336 return new InventoryFolderBase(); 336// return new InventoryFolderBase();
337 } 337// }
338 } 338 }
339 } 339 }
340 340
@@ -347,9 +347,9 @@ namespace OpenSim.Data.NHibernate
347 { 347 {
348 using(ISession session = factory.OpenSession()) { 348 using(ISession session = factory.OpenSession()) {
349 // try { 349 // try {
350 IQuery query = session.CreateQuery("from InventoryFolders i where i.ParentID = :parent"); 350 ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase));
351 query.SetParameter("parent", parentID, NHibernateUtil.Custom(typeof(LLUUIDUserType))); 351 criteria.Add(Expression.Eq("ParentID", parentID) );
352 foreach (InventoryFolderBase item in query.List()) 352 foreach (InventoryFolderBase item in criteria.List())
353 { 353 {
354 folders.Add(item); 354 folders.Add(item);
355 } 355 }