Hi all,
Can some one give me some help on how to write a HQL of the following SQL:
Code:
select c.name, count(i.id)
from category c
left join item i on i.category_id=c.id
left join auction a on a.item_id=i.id and a.is_running=true
group by c.name;
I attempted to write the following HQL, but it doesn't return the same result:
Code:
select c.name, count(i.id) from Category c
left c.items i
left i.auction a
where a.running=true
group by c.name
The problem I have is that SQL has two conditions after ON keyword with no where clause. I don't see clear documentation on how to write this with HQL. Can you help?
Thanks.
/thebugslayer[/code]