Skip to content

Commit c7accf3

Browse files
committed
Fixes #2614
Results from the query should be skipped if they are already in the ISet distinction thus if distinction.Add is false. Currently, they are only added if they have been there before. Signed-off-by: csharper2010
1 parent 58e3cb2 commit c7accf3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/NHibernate/Async/Engine/Query/HQLQueryPlan.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public async Task PerformListAsync(QueryParameters queryParameters, ISessionImpl
7878
for (int x = 0; x < size; x++)
7979
{
8080
object result = tmp[x];
81-
if (distinction.Add(result))
81+
if (!distinction.Add(result))
8282
{
8383
continue;
8484
}

src/NHibernate/Engine/Query/HQLQueryPlan.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public void PerformList(QueryParameters queryParameters, ISessionImplementor ses
128128
for (int x = 0; x < size; x++)
129129
{
130130
object result = tmp[x];
131-
if (distinction.Add(result))
131+
if (!distinction.Add(result))
132132
{
133133
continue;
134134
}

0 commit comments

Comments
 (0)