Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Having clause - more unexpected pickiness
Having clause - more unexpected pickiness [message #387037] Wed, 08 April 2009 15:25 Go to next message
Josh Davis is currently offline Josh Davis
Messages: 10
Registered: July 2009
Junior Member
If I try to run this query:

select city.stateId, count(city.cityId) from VCity city group by
city.stateId having count(city.cityId) >= :value_0

It fails with this error:

invalid HAVING expression [COUNT(city.cityId) >= value_0] for query with
grouping [GROUP BY city.stateId]. The HAVING clause must specify search
conditions over the grouping items or aggregate functions that apply to
grouping items

However, if I change it to this:

select city.stateId, count(city.cityId) from VCity city group by
city.stateId having count(city.stateId) >= :value_0

It works.

Is that expected behavior?
Re: Having clause - more unexpected pickiness [message #387067 is a reply to message #387037] Thu, 09 April 2009 09:30 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Sounds odd, please log the bug.

---
James
http://www.nabble.com/EclipseLink---Users-f26658.html


James : Wiki : Book : Blog : Twitter
Re: Having clause - more unexpected pickiness [message #387079 is a reply to message #387067] Fri, 10 April 2009 09:02 Go to previous message
Josh Davis is currently offline Josh Davis
Messages: 10
Registered: July 2009
Junior Member
Done: https://bugs.eclipse.org/bugs/show_bug.cgi?id=271889
Previous Topic:Is JPA QL supposed to be this picky?
Next Topic:multiple xml-mappings from fragments?
Goto Forum:
  


Current Time: Fri Aug 22 07:49:39 EDT 2014

Powered by FUDForum. Page generated in 0.01439 seconds