Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-dev] "AVG(t1.SALARY)" appears twice in generated SQL query for JUnitJPQLComplexAggregateTestSuite's complexAVGOrderTest

Hi,

I just noticed this while running the JPA test set on Symfoware.

The test's source calls average() only once, but it appears in the SQL
statementselect list twice.
Is it a known issue (perhaps bug 4616218, which is waiting for a bug fix
according to the comment at the top of the class)?

It generates the following SQL (on Symfoware, but I don't think I have
anything specific in my platform class that could be causing it):

SELECT DISTINCT AVG(t1.SALARY), t0.GENDER, AVG(t1.SALARY) FROM
CMP3_EMPLOYEE t0, CMP3_SALARY t1 WHERE ((t0.L_NAME = 'Smith') AND
(t1.EMP_ID = t0.EMP_ID)) GROUP BY t0.GENDER ORDER BY AVG(t1.SALARY)

This query fails on Symfoware because it complains the item in the order
by clause occurs multiple times in the select list.
(I'm not sure why it complains about that, but I thought it's odd this
SQL was generated in the first place).

Thanks,
Dies



Back to the top