Hello!
Look at the documentation
http://www.hibernate.org/hib_docs/nhibe ... a-criteria 12.4. Associations and for the "some elements" part a subquery wolud work
12.8. Detached queries and subqueries
One solution would be to create Criterias like this:
string theValue = "3";
DetachedCriteria query = DetachedCriteria.For(typeof(ImageDetailValue))
.Add( Expression.Eq("Value", theValue ) );
ICriteria crit = session.CreateCriteria(typeof(ImageDetailList))
.CreateCriteria("Details", JoinType.InnerJoin)
.Add( Expression.Eq("DetailType", "Photographer") )
.Add(Subqueries.Exsists("Values", query);
I am not sure but the last subquery part but hopefully I pointed you in teh right direction.
Regards[/url]