The following query works:
Code:
IQuery query = NHibernateSession.CreateQuery("FROM Project p, p.Modes m WHERE m IN (:ProjectTypes)");
query.SetParameterList("ProjectTypes", modes);
The following does not:
Code:
IQuery query = NHibernateSession.CreateQuery("FROM Project p WHERE p.Modes IN (:ProjectTypes)");
query.SetParameterList("ProjectTypes", modes);
Why? With the second NHibernate seems to almost get it right but the select statement is incomplete.
modes is an ArrayList(), and p.Modes is a collection of enumerations.