Skip to content

Commit 4a93c13

Browse files
committed
Rename depth to _depth
1 parent e928c78 commit 4a93c13

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/NHibernate/Loader/JoinWalker.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ namespace NHibernate.Loader
1515
public class JoinWalker
1616
{
1717
private readonly ISessionFactoryImplementor factory;
18-
private int depth;
1918
protected readonly IList<OuterJoinableAssociation> associations = new List<OuterJoinableAssociation>();
2019
private readonly HashSet<AssociationKey> visitedAssociationKeys = new HashSet<AssociationKey>();
2120
private readonly IDictionary<string, IFilter> enabledFilters;
@@ -33,6 +32,7 @@ public class JoinWalker
3332
private LockMode[] lockModeArray;
3433
private SqlString sql;
3534
private readonly Queue<IJoinQueueEntry> _joinQueue = new();
35+
private int _depth;
3636

3737
public string[] CollectionSuffixes
3838
{
@@ -343,7 +343,7 @@ private void WalkCollectionTree(IQueryableCollection persister, string alias, st
343343
// if the current depth is 0, the root thing being loaded is the
344344
// many-to-many collection itself. Here, it is alright to use
345345
// an inner join...
346-
bool useInnerJoin = depth == 0;
346+
bool useInnerJoin = _depth == 0;
347347

348348
var joinType =
349349
GetJoinType(
@@ -354,7 +354,7 @@ private void WalkCollectionTree(IQueryableCollection persister, string alias, st
354354
persister.TableName,
355355
lhsColumns,
356356
!useInnerJoin,
357-
depth - 1,
357+
_depth - 1,
358358
null);
359359

360360
AddAssociationToJoinTreeIfNecessary(
@@ -384,7 +384,7 @@ internal void AddExplicitEntityJoinAssociation(
384384
string path,
385385
string pathAlias)
386386
{
387-
depth = 0;
387+
_depth = 0;
388388
visitedAssociationKeys.Clear();
389389
OuterJoinableAssociation assoc =
390390
InitAssociation(new OuterJoinableAssociation(
@@ -429,7 +429,7 @@ private void WalkEntityAssociationTree(IAssociationType associationType, IOuterJ
429429
lhsTable,
430430
lhsColumns,
431431
nullable,
432-
depth,
432+
_depth,
433433
persister.GetCascadeStyle(propertyNumber));
434434

435435
AddAssociationToJoinTreeIfNecessary(
@@ -514,7 +514,7 @@ protected void WalkComponentTree(IAbstractComponentType componentType, int begin
514514
lhsTable,
515515
lhsColumns,
516516
propertyNullability == null || propertyNullability[i],
517-
depth,
517+
_depth,
518518
componentType.GetCascadeStyle(i));
519519

520520
AddAssociationToJoinTreeIfNecessary(
@@ -582,7 +582,7 @@ private void WalkCompositeElementTree(IAbstractComponentType compositeType, stri
582582
persister.TableName,
583583
lhsColumns,
584584
propertyNullability == null || propertyNullability[i],
585-
depth,
585+
_depth,
586586
compositeType.GetCascadeStyle(i));
587587

588588
AddAssociationToJoinTreeIfNecessary(
@@ -1292,7 +1292,7 @@ private NextLevelJoinQueueEntry()
12921292

12931293
public void Walk(JoinWalker walker)
12941294
{
1295-
walker.depth++;
1295+
walker._depth++;
12961296
}
12971297
}
12981298
}

0 commit comments

Comments
 (0)