File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -520,8 +520,10 @@ public async Task CanFetchNonLazyEntitiesInSubsequentQueryAsync()
520
520
Sfi . Statistics . Clear ( ) ;
521
521
//EntityEager.EagerEntity is lazy initialized instead of being loaded by the second query
522
522
s . QueryOver < EntityEager > ( ) . Fetch ( SelectMode . Skip , x => x . EagerEntity ) . Future ( ) ;
523
- s . QueryOver < EntityEager > ( ) . Fetch ( SelectMode . Fetch , x => x . EagerEntity ) . Future ( ) . ToList ( ) ;
524
- Assert . That ( Sfi . Statistics . PrepareStatementCount , Is . EqualTo ( 1 ) ) ;
523
+ await ( s . QueryOver < EntityEager > ( ) . Fetch ( SelectMode . Fetch , x => x . EagerEntity ) . Future ( ) . GetEnumerableAsync ( ) ) ;
524
+
525
+ if ( SupportsMultipleQueries )
526
+ Assert . That ( Sfi . Statistics . PrepareStatementCount , Is . EqualTo ( 1 ) ) ;
525
527
}
526
528
}
527
529
Original file line number Diff line number Diff line change @@ -508,8 +508,10 @@ public void CanFetchNonLazyEntitiesInSubsequentQuery()
508
508
Sfi . Statistics . Clear ( ) ;
509
509
//EntityEager.EagerEntity is lazy initialized instead of being loaded by the second query
510
510
s . QueryOver < EntityEager > ( ) . Fetch ( SelectMode . Skip , x => x . EagerEntity ) . Future ( ) ;
511
- s . QueryOver < EntityEager > ( ) . Fetch ( SelectMode . Fetch , x => x . EagerEntity ) . Future ( ) . ToList ( ) ;
512
- Assert . That ( Sfi . Statistics . PrepareStatementCount , Is . EqualTo ( 1 ) ) ;
511
+ s . QueryOver < EntityEager > ( ) . Fetch ( SelectMode . Fetch , x => x . EagerEntity ) . Future ( ) . GetEnumerable ( ) ;
512
+
513
+ if ( SupportsMultipleQueries )
514
+ Assert . That ( Sfi . Statistics . PrepareStatementCount , Is . EqualTo ( 1 ) ) ;
513
515
}
514
516
}
515
517
Original file line number Diff line number Diff line change @@ -672,6 +672,9 @@ internal void InitializeEntitiesAndCollections(
672
672
}
673
673
}
674
674
675
+ /// <summary>
676
+ /// Stops further collection population without actual collection initialization.
677
+ /// </summary>
675
678
internal void StopLoadingCollections ( ISessionImplementor session , DbDataReader reader )
676
679
{
677
680
var collectionPersisters = CollectionPersisters ;
You can’t perform that action at this time.
0 commit comments