Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ISessionFactoryImplementor parameter from TableGroupJoinHelper #3411

Merged
merged 3 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/NHibernate/Engine/JoinSequence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ internal virtual JoinFragment ToJoinFragment(
{
Join join = joins[i];

withClauses[i] = GetWithClause(enabledFilters, ref withClauseFragment, join, last);
withClauses[i] = GetWithClause(enabledFilters, join, last, ref withClauseFragment);
last = join.Joinable;
}

if (rootJoinable == null && !IsThetaStyle && TableGroupJoinHelper.ProcessAsTableGroupJoin(joins, withClauses, includeAllSubclassJoins, joinFragment, alias => IsIncluded(alias), factory))
if (rootJoinable == null && !IsThetaStyle && TableGroupJoinHelper.ProcessAsTableGroupJoin(joins, withClauses, includeAllSubclassJoins, joinFragment, alias => IsIncluded(alias)))
{
return joinFragment;
}
Expand Down Expand Up @@ -223,7 +223,7 @@ internal virtual JoinFragment ToJoinFragment(
return joinFragment;
}

private SqlString GetWithClause(IDictionary<string, IFilter> enabledFilters, ref SqlString withClauseFragment, Join join, IJoinable last)
private SqlString GetWithClause(IDictionary<string, IFilter> enabledFilters, Join join, IJoinable last, ref SqlString withClauseFragment)
{
string on = join.AssociationType.GetOnCondition(join.Alias, factory, enabledFilters);
var withConditions = new List<object>();
Expand Down
2 changes: 1 addition & 1 deletion src/NHibernate/Engine/TableGroupJoinHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace NHibernate.Engine
// ) ON person0_.Id = individual1_.PersonID AND individual1_1_.Deleted = @p0
internal class TableGroupJoinHelper
{
internal static bool ProcessAsTableGroupJoin(IReadOnlyList<IJoin> tableGroupJoinables, SqlString[] withClauseFragments, bool includeAllSubclassJoins, JoinFragment joinFragment, Func<string, bool> isSubclassIncluded, ISessionFactoryImplementor sessionFactoryImplementor)
internal static bool ProcessAsTableGroupJoin(IReadOnlyList<IJoin> tableGroupJoinables, SqlString[] withClauseFragments, bool includeAllSubclassJoins, JoinFragment joinFragment, Func<string, bool> isSubclassIncluded)
{
if (!NeedsTableGroupJoin(tableGroupJoinables, withClauseFragments, includeAllSubclassJoins, isSubclassIncluded))
return false;
Expand Down
5 changes: 2 additions & 3 deletions src/NHibernate/Loader/JoinWalker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -898,8 +898,7 @@ protected JoinFragment MergeOuterJoins(IList<OuterJoinableAssociation> associati
new[] {oj.On, entityAssociation.On, string.IsNullOrEmpty(f) ? SqlString.Empty : new SqlString(f)},
true,
outerjoin,
alias => true,
factory))
_ => true))
{
index++;
continue;
Expand All @@ -921,7 +920,7 @@ protected JoinFragment MergeOuterJoins(IList<OuterJoinableAssociation> associati
}
}

if (TableGroupJoinHelper.ProcessAsTableGroupJoin(new[] {oj}, new[] {oj.On, filter}, true, outerjoin, alias => true, factory))
if (TableGroupJoinHelper.ProcessAsTableGroupJoin(new[] {oj}, new[] {oj.On, filter}, true, outerjoin, _ => true))
continue;

oj.AddJoins(outerjoin);
Expand Down
Loading