title: jpa call readonly composite table but getting "Exception Description: Missing descriptor for [CollectorInfo]"
body: <p>In a Spring 3 app a controller is calling a JpaCollectorManager with calls a JpaCollectorInfoDao to get a list which is defined by a nativequery.  The query calls 2 seperate tables which uses sql and jpql because I need to use a postgresql feature not implemented in jpql.  When the controller tries to file the list I get the following error message:</p>
  
  <blockquote>
    <p>Exception [EclipseLink-6007] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.QueryException
    Exception Description: Missing descriptor for [CollectorInfo].<br>
    Query: ReadAllQuery(referenceClass=CollectorInfo sql="select     distinct ON ( col.collector_id,pst.process_source_type ) col.*,pst.process_source_timestamp,pst.process_source_type from      perform_schema.collector col join      perform_schema.process_set pst on       pst.collector_id = col.collector_id order by  col.collector_id, pst.process_source_type,pst.process_source_timestamp desc ")</p>
  </blockquote>
  
  <p>The controller Java has the following call:</p>
  
  <pre><code>List&lt;CollectorInfo&gt; ps = this.collectorInfoManager.getLatestCollectorInfo();
  </code></pre>
  
  <p>The JpaCollectorInfoManager.java has this:</p>
  
  <pre><code>public List&lt;CollectorInfo&gt; getLatestCollectorInfo()
  {
    return collectorInfoDao.getLatestCollectorInfo();
  }
  </code></pre>
  
  <p>The JpaCollectorInfoDao.java:</p>
  
  <pre><code>  @Override
    @Transactional
    public List&lt;CollectorInfo&gt; getLatestCollectorInfo() {
      Query query = entityManager.createNativeQuery( ( "select     distinct ON ( col.collector_id," +
      "pst.process_source_type ) " + 
      "col.*," +
      "pst.process_source_timestamp," + 
      "pst.process_source_type " + 
      "from      perform_schema.collector col " +
      "join      perform_schema.process_set pst " +
       "on       pst.collector_id = col.collector_id " +
      "order by  col.collector_id, " +
      "pst.process_source_type," +
      "pst.process_source_timestamp desc " ),
       CollectorInfo.class );
      return ( (List&lt;CollectorInfo&gt;) query.getResultList() );
    }
  </code></pre>
  
  <p>The CollectorInfo class does not have an @Entity defined.  If I set the @Entity defined then it tells me that the Table cannot be resolved (which is correct since the there is no actual table).  I have tried all sorts of permutations and cannot seem to make this needle thread.</p>