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
- is cloned by
-
JBEAP-18308 [GSS](7.3.z) HHH-13619 HHH-13944 HHH-14533 size() does not work properly as select expression
- Closed