db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Bouschen <mbo.t...@spree.de>
Subject Re: [jira] Commented: (JDO-245) JPOX must throw JDOUserException for queries specifying having clause refering fields which are not part of the result clause.
Date Thu, 05 Jan 2006 15:38:10 GMT
Hi Craig,

[...]

>> CLR: And another negative test for HAVING that uses a term that's not 
>> an aggregate.
>> SELECT department, AVG(weeklyhours) FROM Employee GROUP BY department 
>> HAVING middlename != NULL
>>
>> MBO: OK, then we are back to the original negative query which had a 
>> HAVING clause: HAVING firstname = 'emp1first'. But I can add this, too.
> 
> 
> Yes, please. It's a different negative test from others because it's a 
> boolean expression (ok) using non-aggregate terms (bad).

Just for my understanding: it is ok to use a non-aggregate expression as 
long as it is a grouping expression, correct?

I added a new negative test to class Having:
   SELECT department, AVG(weeklyhours) FROM Employee
   GROUP BY department HAVING firstname == 'emp1First'
JPOX does not catch this error.

I propose the following:
- I check in the change with the new negative test.
- I reopen issue JDO-245.
- I really think the title of JDO-245 talking about "having clause 
refering fields which are not part of the result clause" is misleading, 
because the result clause does not matter here. I would like to change 
the title.
- I would like to move the test class from the result package to jdoql.

What do you think?

Regards Michael
-- 
Michael Bouschen		Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de	http://www.tech.spree.de/
Tel.:++49/30/235 520-33		Buelowstr. 66			
Fax.:++49/30/2175 2012		D-10783 Berlin			

Mime
View raw message