Skip to content

Commit 2ad5e7a

Browse files
Apply suggestions from code review
Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>
1 parent 44cf75c commit 2ad5e7a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/NHibernate/Engine/TableGroupJoinHelper.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ internal class TableGroupJoinHelper
1717
{
1818
internal static bool ProcessAsTableGroupJoin(IReadOnlyList<IJoin> tableGroupJoinables, SqlString[] withClauseFragments, bool includeAllSubclassJoins, JoinFragment joinFragment, Func<string, bool> isSubclassIncluded, ISessionFactoryImplementor sessionFactoryImplementor)
1919
{
20-
if (!TableGroupJoinHelper.NeedsTableGroupJoin(tableGroupJoinables, withClauseFragments, includeAllSubclassJoins))
20+
if (!NeedsTableGroupJoin(tableGroupJoinables, withClauseFragments, includeAllSubclassJoins))
2121
return false;
2222

2323
var first = tableGroupJoinables[0];
@@ -51,15 +51,15 @@ internal static bool ProcessAsTableGroupJoin(IReadOnlyList<IJoin> tableGroupJoin
5151
join.Joinable.WhereJoinFragment(join.Alias, innerJoin, include));
5252
}
5353

54-
var withClause = TableGroupJoinHelper.GetTableGroupJoinWithClause(withClauseFragments, first, sessionFactoryImplementor);
54+
var withClause = GetTableGroupJoinWithClause(withClauseFragments, first, sessionFactoryImplementor);
5555
joinFragment.AddFromFragmentString(withClause);
5656
return true;
5757
}
5858

5959
private static bool NeedsTableGroupJoin(IReadOnlyList<IJoin> joins, SqlString[] withClauseFragments, bool includeSubclasses)
6060
{
61-
// If the rewrite is disabled or we don't have a with clause, we don't need a table group join
62-
if ( /*!collectionJoinSubquery ||*/ withClauseFragments.All(x => SqlStringHelper.IsEmpty(x)))
61+
// If we don't have a with clause, we don't need a table group join
62+
if (withClauseFragments.All(x => SqlStringHelper.IsEmpty(x)))
6363
{
6464
return false;
6565
}

0 commit comments

Comments
 (0)