title: Hibernate - How to execute named native query without mapping to a specific class
body: <p>I have a very complicated query that doesn't convert to HQL, so I must use SQL. I put my query into a NamedNativeQuery annotation. It "should" return a list of two values (<code>List&lt;Object[2]&gt;</code>). When I try to run, the session fails to load the query because I haven't defined a mapping or result class. I cannot create a simple class to map these values to because the annotations have to go in a specific DAO project and the code that is using the queries exists in its own project. (The DAO project is more general-purpose and the entities in that project map directly to tables in our database. I cannot just create a small class in this project to map to my query result because it wouldn't fit the schema of this project)</p>
  
  <p>Is there a way for me to map the query results to a more generic class, or even better is there some way for me to just get a <code>List&lt;Object[]&gt;</code> back without having to map at all to anything particular? This is extremely frustrating that Hibernate has to work in this particular way when all I want to do is execute a query and get the result back as an array.</p>