Thanks Wolfgang. That worked. I kept thinking that I did not have to supply the "c.Id" as the HQL can count the collection with just count(p.Comments).
Much appreciated. On Jun 23, 2:14 am, dummerchen <[email protected]> wrote: > Try: > > criteria.CreateAlias("Comments", JoinType.LeftOuterJoin, "c"); > > criteria.SetProjection( > Projections.ProjectionList() > ... > .Add(Projections.Count("c.Id")) > ); > > -- > Wolfgang --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
