title: applying to number and order by for a column of varchar type in hibernate using criteria?
body: <p>I am using hibernate. i have below native sql query.</p>
  
  <pre><code>select * from some_table order by to_number(someId);
  </code></pre>
  
  <p>here someId column contains all numbers but datatype is of varchar type. so while pulling i need to apply order by. if order by is applied with out to_number then ASCII comparison is done. to avoid that i need to apply order by with to_number. </p>
  
  <p>how can i achieve the same using criteria? i am not using annotations. using hbms.</p>
  
  <p>Thanks! </p>