| You probably already know, but you can use an expression like CASE WHEN type = 'VVIP' THEN 1 ELSE 0 END DESC to achieve the same which is not only already allowed by HQL but is also widely supported by DBMS. Putting the bare predicate into the order by clause won't work for all databases so it has to be wrapped by such a case when expression. |