title: Cast Hibernate result to a list of objects
body: <p>I have a hibernate call in my DAO that looks like this</p>
  
  <pre><code>List&lt;Associate&gt; associate = (List&lt;Associate&gt;)session.createSQLQuery("SELECT * FROM associates WHERE fk_id = :id AND fk_associate_id = (SELECT id FROM users WHERE fk_user_type = 2)").setParameter("id", id).list();
  </code></pre>
  
  <p>I am getting an error saying that I cannot cast the resulting list to the model type Associate. I don't understand why this is happening. I am returning only the fields that are in the associates table.</p>