nHibernate Criteria for selecting a parent if a child in a collection ahs a specific value

Posted by AWC on Stack Overflow See other posts from Stack Overflow or by AWC
Published on 2010-04-28T13:01:36Z Indexed on 2010/04/28 13:13 UTC
Read the original article Hit count: 300

Filed under:
|

If I have the following class structure what is the NH criteria to select a parent if one of it's children has a specific name?

 public class Child
 {
     public int Id { get; set; }
     public int Name { get; set; }
 }

 public class Parent
 {
     public int Id { get; set; }
     public IList<Child> Children { get; set; }
 }

© Stack Overflow or respective owner

Related posts about nhibernate

Related posts about criteria