If I have Order entity with a list of OrderDetails I can easily eager load the detail along with the order by using NHibernateUtil.Initialize(Order.Details). So obviously the NHibernate have all the information to generate the sql statement. But how do I query the database for just the Details (similar to CreateSourceQuery in Entity Framework) without manually creating a criteria? Is there something like NHibernateUtil.GetList(Order.Details)?
Update: Using Darin's answer this what I finally ended up with. This is generic enough i can implement it in entity base class
Dim entity as EntityBase
Dim queryString = String.Format("select entityAlias.{1} from {0} entityAlias where entityAlias.id = :ID", entity.GetType.Name, collectionPropertyName)
Dim query = Session.CreateQuery(queryString).SetParameter("ID", entity.ID)
Return query.List