title: Return partial Entity from EntityManager
body: <p><code>JPA-QL</code> states that I should be able to query an Entity with <code>select s.message from Status s</code>, which does works in an <code>JPA-QL</code> console.</p>
  
  <p>However, what I'd really like to do is only return specific properties of the Entity in a return list, like so:</p>
  
  <pre><code>@GET
  @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
  public List&lt;Status&gt; getIt() {
      EntityManager em = PersistenceManager.INSTANCE.getEntityManager();
      List&lt;Status&gt; results = em.createQuery("select s.message from Status s").getResultList();
  
      return results;
  }
  </code></pre>
  
  <p>That errors out, though, with no real error message at all.
  I can see that Hibernate ran this query:</p>
  
  <pre><code>Hibernate: 
      select
          status0_.ID as col_0_0_ 
      from
          LIBRARY.TABLE status0_
  </code></pre>
  
  <p>A traditional <code>select s from Status s</code> works just fine:</p>
  
  <pre><code>@GET
  @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
  public List&lt;Status&gt; getIt() {
      EntityManager em = PersistenceManager.INSTANCE.getEntityManager();
      List&lt;Status&gt; results = em.createQuery("select s from Status s").getResultList();
  
      return results;
  }
  </code></pre>