title: Group by using linq with NHibernate 3.0
body: <p>As far as I know group by has only been added in NHibernate 3.0, but even when using version 3, I can't get group by to work.</p>
  
  <p>I have tried to do the following query:</p>
  
  <blockquote>
    <p>Session.Query().GroupBy(gbftr
    => gbftr.Tag).OrderByDescending(obftr => obftr.Count()).Take(count).ToList();</p>
  </blockquote>
  
  <p>But I receive the following error:</p>
  
  <pre><code>Antlr.Runtime.NoViableAltException'. [. OrderByDescending (. GroupBy (NHibernate.Linq.NhQueryable `1 [Forum.Core.ForumTagRelation] Quote ((gbftr,) =&gt; (gbftr.Tag)),), Quote ((obftr,) =&gt; (. Count (obftr,))),)]
  </code></pre>
  
  <p>Does anyone have an idea if I might be mistaken, and group by isn't implemented in NHibernate 3.0, or who knows what I might be doing wrong?</p>