Reputation: 33
How can the following SQL query be translated into a HQL query?
select c.*, count(o.*)
from Cooperativa as c
left join Operatore as o on c.id = o.id_cooperativa
where c.flag_cancellazione = 0
group by c.id
order by c.id desc
Thanks.
Upvotes: 0
Views: 1578
Reputation: 8830
Have a look and do R&D http://www.tutorialspoint.com/hibernate/hibernate_query_language.htm http://dev.wavemaker.com/wiki/bin/Dev/HqlTutorial
For more reference : http://docs.jboss.org/hibernate/orm/3.3/reference/en/html/queryhql.html
Upvotes: 1