Skip to content

Commit 37d9a67

Browse files
committed
NH-2560 - Add additional test
1 parent 4f13af5 commit 37d9a67

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/NHibernate.Test/Linq/ByMethod/GroupByTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,18 @@ public void SingleKeyPropertyGroupAndOrderByCountBeforeProjection()
143143
AssertOrderedBy.Descending(orderCounts, oc => oc.OrderCount);
144144
}
145145

146+
[Test, KnownBug("NH-????"), Description("Discovered as part of NH-2560")]
147+
public void SingleKeyPropertyGroupWithOrderByCount()
148+
{
149+
var result = db.Orders
150+
.GroupBy(o => o.Customer)
151+
.OrderByDescending(g => g.Count()) // it seems like there we should do order on client-side
152+
.Select(g => g.Key)
153+
.ToList();
154+
155+
Assert.That(result.Count, Is.EqualTo(89));
156+
}
157+
146158
[Test, KnownBug("NH-3027")]
147159
public void SingleKeyPropertyGroupByEntityAndSelectEntity()
148160
{

0 commit comments

Comments
 (0)