未验证 提交 20ec2405 编写于 作者: A Alex Zaytsev 提交者: GitHub

Remove ISessionFactoryImplementor parameter from TableGroupJoinHelper (#3411)

上级 fca2fe9e
......@@ -187,11 +187,11 @@ public JoinFragment ToJoinFragment(IDictionary<string, IFilter> enabledFilters,
{
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;
}
......@@ -223,7 +223,7 @@ public JoinFragment ToJoinFragment(IDictionary<string, IFilter> enabledFilters,
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>();
......
......@@ -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;
......
......@@ -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;
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册