title: It is possible to use "and" in hibernate "case when...then...else...end"?
body: <p>I have the following query:</p>
  
  <pre><code>select myentity from TEST as test
  left join test.org.parent as parentOrg
  left join test.clientRequest as clientReq
  where test.customId = 1 and (test.dstatus = 1 or test.cm = true)
  order by (case when test.request != '' then test.request else clientReq.name end) asc;
  </code></pre>
  
  <p>It works correctly. But I need not only <code>clientReq.name</code> but also <code>clientReq.surname</code>. Is it possible to combine theese two columns in this <code>case when...then...else...end</code>?</p>
  
  <p>Something like:</p>
  
  <pre><code>order by (case when test.request != '' then test.request else (clientReq.name and clientReq.surname) end) asc;
  </code></pre>
  
  <p>This one throws exception:</p>
  
  <pre><code>org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected AST node
  </code></pre>