NHibernate - QueryOver criteria appearing in Where instead in Having clause, error
问题 I have a problem in QueryOver where using Group by and have some criteria in where clause. Want to move some criteria with SUM() values in Having clause but every time it appears in Where clause and result in error. **Error** ="*An aggregate may not appear in the WHERE clause unless it is in a subquery contained in a HAVING clause or a select list, and the column being aggregated is an outer reference*" Conjunction conjunction = Restrictions.Conjunction(); Conjunction havingconjun =