My ProductSchedule object contains a Set. With the following HQL I am getting no objects back from Hibernate because all my Sets are currently empty.
Code:
select s.id, s.title, s.status, s.lastUpdated, count(elements(s.updates))
from ProductSchedule as s group by s.id, s.title, s.status, s.lastUpdated
order by created asc
The HQL output reveals that Hibernate is using an INNER JOIN from ProductSchedules to ScheduleUpdates (the objects in the Set).
My brain is frying as to how I change the above HQL so that it does a left outer join.
I tried
Code:
select s.id, s.title, s.status, s.lastUpdated, count(elements(s.updates))
from ProductSchedule left outer join ScheduleUpdate as s group by s.id, s.title, s.status, s.lastUpdated
order by created asc
but I get
outer or full join must be followed by path expression [select s.id, s.title, s.status, s.lastUpdated, count(elements(s.updates)) from com.qas.newmedia.intranet.iq.dto.schedules.ProductSchedule as s left outer join ScheduleUpdate u group by s.id, s.title, s.status, s.lastUpdated order by title asc]
Cheers *sigh*