Wrong Fields Mapping While Using SUM() And COALESCE() In Query List
(Doc ID 1572311.1)
Last updated on DECEMBER 03, 2024
Applies to:
Oracle TopLink - Version 11.1.1.4.0 to 12.1.2.0.0 [Release Oracle11g to 12c]Information in this document applies to any platform.
Symptoms
When using function SUM() and COALESCE() in JPQL's query as the following :
The first SUM(..) and second SUM(..) is repeated which is not in the original JPQL. And the mapping in entity is correct.
Make a minor change in above JPQL, like change one of the operators from "+" to "-" in function SUM() and you get correct translated SQL.
The JPQL will also be translated correctly if you remove one of the item( like COALESCE(e.projects,0) ) in the second SUM(..).
Changes
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |
References |