Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:3.2.1ga
I am unable to get a distinct query with multiple entities in HQL to work. It looks like,
select distinct (emp, dept)
from Employee emp, Department dept, Lines l, Costs c
where emp.lid = l.id
and l.cid = c.id
and c.did = dept.id
I would expect to get a list of distinct (emp, dept) combinations in the returned list. However I am getting exceptions like "Expected CLOSE but found a ,"
Firstly, Am I doing the wrong thing in trying to select a distinct tuple of entities. If no, how is this being achieved in Hibernate?