@@ -15,7 +15,6 @@ namespace NHibernate.Loader
15
15
public class JoinWalker
16
16
{
17
17
private readonly ISessionFactoryImplementor factory ;
18
- private int depth ;
19
18
protected readonly IList < OuterJoinableAssociation > associations = new List < OuterJoinableAssociation > ( ) ;
20
19
private readonly HashSet < AssociationKey > visitedAssociationKeys = new HashSet < AssociationKey > ( ) ;
21
20
private readonly IDictionary < string , IFilter > enabledFilters ;
@@ -33,6 +32,7 @@ public class JoinWalker
33
32
private LockMode [ ] lockModeArray ;
34
33
private SqlString sql ;
35
34
private readonly Queue < IJoinQueueEntry > _joinQueue = new ( ) ;
35
+ private int _depth ;
36
36
37
37
public string [ ] CollectionSuffixes
38
38
{
@@ -343,7 +343,7 @@ private void WalkCollectionTree(IQueryableCollection persister, string alias, st
343
343
// if the current depth is 0, the root thing being loaded is the
344
344
// many-to-many collection itself. Here, it is alright to use
345
345
// an inner join...
346
- bool useInnerJoin = depth == 0 ;
346
+ bool useInnerJoin = _depth == 0 ;
347
347
348
348
var joinType =
349
349
GetJoinType (
@@ -354,7 +354,7 @@ private void WalkCollectionTree(IQueryableCollection persister, string alias, st
354
354
persister . TableName ,
355
355
lhsColumns ,
356
356
! useInnerJoin ,
357
- depth - 1 ,
357
+ _depth - 1 ,
358
358
null ) ;
359
359
360
360
AddAssociationToJoinTreeIfNecessary (
@@ -384,7 +384,7 @@ internal void AddExplicitEntityJoinAssociation(
384
384
string path ,
385
385
string pathAlias )
386
386
{
387
- depth = 0 ;
387
+ _depth = 0 ;
388
388
visitedAssociationKeys . Clear ( ) ;
389
389
OuterJoinableAssociation assoc =
390
390
InitAssociation ( new OuterJoinableAssociation (
@@ -429,7 +429,7 @@ private void WalkEntityAssociationTree(IAssociationType associationType, IOuterJ
429
429
lhsTable ,
430
430
lhsColumns ,
431
431
nullable ,
432
- depth ,
432
+ _depth ,
433
433
persister . GetCascadeStyle ( propertyNumber ) ) ;
434
434
435
435
AddAssociationToJoinTreeIfNecessary (
@@ -514,7 +514,7 @@ protected void WalkComponentTree(IAbstractComponentType componentType, int begin
514
514
lhsTable ,
515
515
lhsColumns ,
516
516
propertyNullability == null || propertyNullability [ i ] ,
517
- depth ,
517
+ _depth ,
518
518
componentType . GetCascadeStyle ( i ) ) ;
519
519
520
520
AddAssociationToJoinTreeIfNecessary (
@@ -582,7 +582,7 @@ private void WalkCompositeElementTree(IAbstractComponentType compositeType, stri
582
582
persister . TableName ,
583
583
lhsColumns ,
584
584
propertyNullability == null || propertyNullability [ i ] ,
585
- depth ,
585
+ _depth ,
586
586
compositeType . GetCascadeStyle ( i ) ) ;
587
587
588
588
AddAssociationToJoinTreeIfNecessary (
@@ -1292,7 +1292,7 @@ private NextLevelJoinQueueEntry()
1292
1292
1293
1293
public void Walk ( JoinWalker walker )
1294
1294
{
1295
- walker . depth ++ ;
1295
+ walker . _depth ++ ;
1296
1296
}
1297
1297
}
1298
1298
}
0 commit comments