| Hi,
 I have two classes :
 
 class Source and class Post, which has a many to one relationship with Source. In the mapping of Post I therefore have something like :
 
 <many-to-one class="Comp.Source,Compname="theSource" cascade="all-delete-orphan" column="SourceID" />
 
 Now in HQL I'm trying to get a list of Source, only I want to limit this list to the Source entities that are associated to Post entities (in other word I want to do an inner join).
 
 So far I've got this :
 
 ICriteria sourceCriteria = SessionManager.GetCurrentSession().CreateCriteria(typeof (Source));
 sourceCriteria.SetMaxResults(10).List<Source>();
 
 Now how do I limit this to only the Source associated to a Post ?
 
 Thanks
 
 PS: the code is C# but I'm happy with Java equivalent.
 
 
 |