How could I replace the HQL query below using QueryOver API?
var sql = "from Role r, Action a where r.Active = :active and a.Active = :active";
var result = manager.Session.GetISession().CreateQuery(sql)
.SetBoolean("active", true).List();
I don’t believe there’s a way to do this in QueryOver, since both
JoinAliasandJoinQueryOverrequire an expression describing a path to the related entity.However, this is easy to accomplish in LINQ-to-NHibernate:
With NH 3.2, here’s the SQL I get: