@@ -16,6 +16,8 @@ namespace NHibernate.Multi
16
16
/// </summary>
17
17
public abstract partial class QueryBatchItemBase < TResult > : IQueryBatchItem < TResult > , IQueryBatchItemWithAsyncProcessResults
18
18
{
19
+ private static readonly INHibernateLogger Log = NHibernateLogger . For ( typeof ( QueryBatch ) ) ;
20
+
19
21
protected ISessionImplementor Session ;
20
22
private List < EntityKey [ ] > [ ] _subselectResultKeys ;
21
23
private List < QueryInfo > _queryInfos ;
@@ -175,6 +177,7 @@ public int ProcessResultsSet(DbDataReader reader)
175
177
176
178
var dialect = Session . Factory . Dialect ;
177
179
var hydratedObjects = new List < object > [ _queryInfos . Count ] ;
180
+ var isDebugLog = Log . IsDebugEnabled ( ) ;
178
181
179
182
using ( Session . SwitchCacheMode ( _cacheMode ) )
180
183
{
@@ -217,8 +220,15 @@ public int ProcessResultsSet(DbDataReader reader)
217
220
var optionalObjectKey = Loader . Loader . GetOptionalObjectKey ( queryParameters , Session ) ;
218
221
var tmpResults = new List < object > ( ) ;
219
222
220
- for ( var count = 0 ; count < maxRows && reader . Read ( ) ; count ++ )
223
+ if ( isDebugLog )
224
+ Log . Debug ( "processing result set" ) ;
225
+
226
+ int count ;
227
+ for ( count = 0 ; count < maxRows && reader . Read ( ) ; count ++ )
221
228
{
229
+ if ( isDebugLog )
230
+ Log . Debug ( "result set row: {0}" , count ) ;
231
+
222
232
rowCount ++ ;
223
233
224
234
var o =
@@ -242,6 +252,9 @@ public int ProcessResultsSet(DbDataReader reader)
242
252
tmpResults . Add ( o ) ;
243
253
}
244
254
255
+ if ( isDebugLog )
256
+ Log . Debug ( "done processing result set ({0} rows)" , count ) ;
257
+
245
258
queryInfo . Result = tmpResults ;
246
259
if ( queryInfo . CanPutToCache )
247
260
queryInfo . ResultToCache = new List < object > ( tmpResults ) ;
0 commit comments