title: Loading Two Unrelated Entities (nothing in comman) in One Query [Spring Data JPA]
body: <p>How can two unrelated entities , nothing in common be loaded in one Query using spring data jpa?</p>
  
  <p>Current Code :</p>
  
  <pre><code> User user = userRepo.findOne(userId);
   Post post = postRepo.findOne(postId);    
  </code></pre>
  
  <p>This creates two sql query is there any way to do it 1 Query.</p>
  
  <p>Is there any way doing like this</p>
  
  <pre><code>  Object[] userAndPost = someRepo.findUserAndPost(userId, postId);
  </code></pre>
  
  <p>Please note both user and post are unrelated and have no common column on which join can be done.</p>
  
  <p>Sandeep</p>