Criteria API restriction over aggregate function wrapped in NotExpression is wrongly placed in WHERE clause instead of HAVING clause which generates invalid SQL

Description

introduced bug in NotExpression.GetProjections() - restriction over aggregate function wrapped in NotExpression is wrongly placed in WHERE clause instead of HAVING clause which generates invalid SQL

test and bug fix are provided as pull request here: https://github.com/nhibernate/nhibernate-core/pull/3

Environment

None

Activity

Show:

Oskar Berggren 
May 30, 2012 at 6:31 PM

Closing issues fixed in 3.3.1.CR1.

Julian Maughan 
September 20, 2011 at 5:02 PM

Thanks Filip for your test and GitHub pull-request. I have committed your changes to the NHibernate repository, and they will be in the next release.

Tom Marien 
September 20, 2011 at 3:18 PM

Julian, will try to do it in the next few days thx

Julian Maughan 
September 20, 2011 at 2:21 PM

Tom, I will be closing this issue if Fillip's fix is good, so you will probably need to create a new one. What we would like from you are tests to demonstrate the problem - and fixes would be even better, of course. If you clone the NHibernate repository, there are now instructions on writing tests in the root folder.

Tom Marien 
September 10, 2011 at 1:52 PM

Related : Your fix is correct, but also introduced bug in combining restrictions over aggregate functions with AND/OR. Should i create new bug and fix only those two or should Filip try to add it ??

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created September 3, 2011 at 1:42 PM
Updated May 30, 2012 at 6:31 PM
Resolved September 20, 2011 at 5:02 PM
Who's Looking?