日期:2014-05-17 浏览次数:20456 次
IList list = null; ArrayList arr = new ArrayList(); try { ISession session = SessionFactory.OpenSession(_AssemblyName); //string sql = "From LongFiction as a left join Fetch a.LongTypeInfo"; string sql = "From LongFiction as a,LongTypeInfo as b where a.LongTypeInfo =b.id"; list = session.CreateQuery(sql).List(); IEnumerator ie = list.GetEnumerator(); while (ie.MoveNext()) { Object[] objs = (Object[])ie.Current; LongFiction l = (LongFiction)objs[0]; LongTypeInfo info = (LongTypeInfo)objs[1]; UserCollection collection = new UserCollection(l, info); arr.Add(collection); } } catch (Exception ex) { throw; } return arr;