I need to create a query in NHibernate that would search for a product of two columns, like this:
WHERE a*b = param1
leaving efficiency aside (assume I have little rows or actual query will have extra conditions that will exploit some indexes) how do I do it in NHibernate? Preferably the solution should work with DetachedCriteria. I know I could use native SQL with Expression.Sql() but is there any other, better, way? Can I do this in HQL?