 <p>try to tweak this</p> <pre><code>var subquery = DetachedCriteria.For&lt;Event&gt;() .Add(Restrictions.Eq("Success", true)) .Add(Restrictions.EqProperty("User.Id", "u.id")) .AddOrder(Order.Desc("TimeStamp")) .SetProjection(Projections.Property("EventType")) .SetMaxResults(1); session.CreateCriteria&lt;User&gt;("u") .Add(Restrictions.Ge("LastActivityTimeStamp", cutoff)) .Add(Subqueries.Ne(EventType.LogOff, subquery)); </code></pre>