title: How do I write hql query with cast?
body: <p>I need to combine 2 tables using hql, both are having common column, but <code>table1</code> common column is <code>integer</code> and <code>table2</code> common column is <code>String</code></p>
  
  <p>For example,</p>
  
  <pre><code>select a.id as id,a.name as name,b.address as address 
  from Personal as a,Home as b 
  where a.id=b.studid
  </code></pre>
  
  <p>Here <code>a.id</code> is an <code>integer</code> while <code>b.stduid</code> is a <code>string</code>, but Data of both columns is the same.</p>
  
  <p>How can I get the result of the query using hql query?</p>