Exception occurs when using criteria exist queries
When using a Criteria query with Exist with subquery, a "QueryException" is raised. The exception is handled, quoting the remark:
"//not found in inner query , try the outer query"
The query executes successfully, but causes a significant performance overhead because of the exception.
This can easily be reproduced, for example:
DetachedCriteria dc = DetachedCriteria.For(typeof(Employee))
IList<Department> departments =