Hey,
Say I have 3 classes
class foo1 { List<foo2
> prop1;}
class foo2 { foo3 prop2;}
class foo3{ int Id;}
now I want to select distinct foo2's from foo1 and get Id of foo3.
I need to write a HQL stmt for the same.
I tried the following
select c.Id from (select distinct(a.prop1) from foo1.prop1 as a ) as b inner join b.prop2 as c
This throws an 'Antlr.Runtime.NoViableAltException
How do you suggest I should go about the same. Please note the inner subquery is working fine. So if I have made some mistakes in there please ignore that.
I need a method to do the latter.
Thanks in Advance.