title: Hibernate/JPA map Result of native Query to non-Entity holding Entities
body: <p>I do have 3 Entities and want to Cross-Join them. As I do not need to create a new Entity for this I just wanted to map the by fetching with a native Query:</p>
  
  <pre><code>EntityA{
      ...
      String someValue;
  }
  
  EntityB{
      ...
      String someValue;
  }
  
  EntityC{
      ...
      String someValue;
  }
  </code></pre>
  
  <p>And the CrossJoined Object</p>
  
  <pre><code>CrossJoinedFoo{
      EntityA entityA;
      EntityB entityB;
      EntityC entityC;
  }
  </code></pre>
  
  <p>I am using it like:</p>
  
  <pre><code>private static final String _SELECT_CROSS_JOIN_ENTITIES = "SELECT * FROM "
              + "EntityA"
              + ", "
              + "EntityB"
              + ", "
              + "EntityC"
              + " WHERE (1=1) "
              + " AND " + "EntityA.someValue = :someValue"
              + " AND " + "EntityB.someValue = :someValue"
              + " AND " + "EntityC.someValue = :someValue";
  
  Query query = entityManager.createNativeQuery(_SELECT_CROSS_JOIN_ENTITIES);
  query.setParameter(":someValue", "foo");
  </code></pre>
  
  <p>How can I achieve this behavior?</p>