title: Disabling JPA Hibernate schema validation for a single entity
body: <p>I have a JPA entity that I use as the result class of a native query. As such, the entity is not valid per se (as it does not have a table). I use Hibernate 4.1.x as my JPA provider, which performs a schema validation during startup and consequently fails (I did not specify an explicit table):</p>
  
  <pre><code>org.hibernate.HibernateException: Missing table: MyEntity
      at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1272)
      [...]
  </code></pre>
  
  <p>Is there a way to turn off schema validation for just a single entity (using JPA or hibernate annotations or a change of persistence.xml)? </p>
  
  <p><strong>Edit:</strong> I can completely avoid using any entity as a result, but then  Hibernate will return a <code>List&lt;Object[]&gt;</code> as query result, which technically works, but is a little ugly to use:</p>
  
  <pre><code>Query query = entityManager.get().createNativeQuery("SELECT node, last_update FROM mm_repl_monitoring.my_mm_nodes");
  List&lt;Object[]&gt; statuses = query.getResultList();
  </code></pre>
  
  <p>In other words: It would be nice if there was some mapping support that can be used even for native queries that map to non-Entity classes.</p>