I'm using the following HQL and it return a correct result :
select distinct new net.rhuanrocha.dto.CompanyDto(c.id,c.name,0)
from Company c left join c.customers cu
where c.name =:name
group by c.id, c.name
But when I use the size function in my HQL the query results is wrong (In my case is returning an empty result). Look this HQL:
select distinct new net.rhuanrocha.dto.CompanyDto(c.id,c.name,size(c.customers))
from Company c left join c.customers cu
where c.name =:name
group by c.id, c.name
- clones
-
JBEAP-18308 [GSS](7.3.z) HHH-13619 HHH-13944 HHH-14533 size() does not work properly as select expression
- Closed
- is incorporated by
-
JBEAP-18792 [GSS](7.2.z) Upgrade Hibernate ORM from 5.3.17 to 5.3.18
- Closed