Joined: Mon Jul 21, 2008 3:01 pm Posts: 7
|
I want Nhibernate to generate a query in the following manner..
select case when Priority = 'High' then 0 else 1
end AS BatchPrioritySort, *
from TranslationBatch
order by BatchPrioritySort DESC
The 'High' option will be passed in as a filter criteria so i don't see how I can make it a formula field in the .hbm file.
So essentially I need to order by a varchar / string field and the ordering can change based on how the user filters.
I'm open to writing the SQL but I have many fields which can be filtered by and it is so easy to user Nhibernate objects to build the query!
Thanks -
|
|