title: Hibernate Criteria.list() causing java.lang.ClassCastException
body: <p>I'm coming back to Java after a few years away and this is my 2nd day looking at hibernate and don't fully understand it yet.</p>
  
  <p>I have the following criteria which is performing a join:</p>
  
  <pre><code>Criteria cr = s.createCriteria(Bla.class, "bla");
  cr.setFetchMode("bla.nodePair", FetchMode.JOIN);
  cr.createAlias("bla.nodePair", "node_pair");
  cr.add(Restrictions.in("bla.blaName", (List&lt;Bla&gt;) getBlas()));
  
  ProjectionList columns = Projections.projectionList()
      .add(Projections.property("node_pair.priNode"))
      .add(Projections.property("bla.blaName"))
      .add(Projections.property("node_pair.secNode"))
      .add(Projections.property("bla.port"));
  
  cr.setProjection(columns);
  List&lt;Object[]&gt; list = cr.list(); // Exception occurs here
  </code></pre>
  
  <p>This is creating as far as I can tell a valid SQL query and exactly what i'm after.</p>
  
  <p>However, when I try to generate a list of results <code>cr.list();</code> I get:</p>
  
  <pre><code>java.lang.ClassCastException: com.some.package.domainobject.Bla cannot be cast to java.lang.String
  </code></pre>
  
  <p>How should I construct my List. Any pointers much appreciated.</p>