title: Return type for Android Room joins
body: <p>Let's say I want to do an <code>INNER JOIN</code> between two entities <code>Foo</code> and <code>Bar</code>:</p>
  
  <pre><code>@Query("SELECT * FROM Foo INNER JOIN Bar ON Foo.bar = Bar.id")
  List&lt;FooAndBar&gt; findAllFooAndBar();
  </code></pre>
  
  <p>Is it possible to force a return type like this?</p>
  
  <pre><code>public class FooAndBar {
      Foo foo;
      Bar bar;
  }
  </code></pre>
  
  <p>When I try to do that, I get this error:</p>
  
  <pre><code>error: Cannot figure out how to read this field from a cursor.
  </code></pre>
  
  <p>I've also tried aliasing the table names to match the field names, but that didn't work either.</p>
  
  <p>If this isn't possible, how should I cleanly construct a compatible return type that includes all fields for both entities?</p>