From: Michael D. <mik...@us...> - 2004-08-27 04:13:33
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4516/Hql Modified Files: QueryTranslator.cs Log Message: Changed Loader.GetResultSet() method to protected so I coud call the method in QueryTranslator Index: QueryTranslator.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/QueryTranslator.cs,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** QueryTranslator.cs 20 Aug 2004 17:39:02 -0000 1.41 --- QueryTranslator.cs 27 Aug 2004 04:13:17 -0000 1.42 *************** *** 930,962 **** sqlWithLock, values, types, namedParams, selection, false, session); ! try ! { ! SetMaxRows(st, selection); ! ! //TODO: H2.0.3 - uses session.Batcher.GetResultSet(st) instead ! // of directly executing the reader - the Batcher can be smarter ! // about when to wrap the IDataReader in an NDataReader ! IDataReader rs = st.ExecuteReader(); ! ! //TODO: make this a much smarter implementation that looks at the Type ! // that is being loaded and determines wether or not to wrap this IDataReader ! // in a NDataReader. I believe the problem of multiple readers being opened ! // are occuring in <composite-id> with <many-to-one> and <component> with ! // a <collection>, <many-to-one>, and <one-to-one> inside of them. I believe ! // this is caused when the NullSafeGet() method calls other methods that can ! // potentially perform a Load of another object. ! if(!session.Factory.ConnectionProvider.Driver.SupportsMultipleOpenReaders) ! { ! rs = new Driver.NDataReader(rs); ! } ! ! Advance(rs, selection, session); ! return new EnumerableImpl(rs, session, ReturnTypes, ScalarColumnNames ); ! } ! catch (Exception e) ! { ! ClosePreparedStatement(st, selection, session); ! throw e; ! } } --- 930,937 ---- sqlWithLock, values, types, namedParams, selection, false, session); ! ! IDataReader rs = GetResultSet( st, selection, session ); ! return new EnumerableImpl(rs, st, session, ReturnTypes, ScalarColumnNames ); ! } |