title: Android Room return type for result of JOIN with WHERE clause
body: <p>I have a following <code>query</code>, which returns list of chats and its last messages sorted by last message time:</p>
  <pre><code>SELECT c.*, m.*
  FROM (SELECT local_id, local_chat_id, MAX(created_at) AS max_created_at
        FROM message
        WHERE status != 2
        GROUP BY local_chat_id) m1
  INNER JOIN message m 
  ON m.local_id == m1.local_id AND m.created_at == m1.max_created_at
  INNER JOIN chat c
  ON m1.local_chat_id == c.local_id
  ORDER BY m1.max_created_at DESC
  </code></pre>
  <p>and corresponding method in <code>ChatDao</code>:</p>
  <pre><code>@Transaction
  @Query(query)
  fun getAllChats(): Flow&lt;List&lt;ChatWithMessage&gt;&gt;
  </code></pre>
  <p>I tested this query in database inspector and it works fine.
  However, I don't know how to return the result of the query. I don't want to deal with <code>@Embedded</code> for both <code>Chat</code> and <code>Message</code> entities in <code>ChatWithMessage</code> class because they have same field <code>local_id</code>, so I would have to use <code>prefix</code> and aliases for every field of the resulting table, which is awful, because <code>Chat</code> and <code>Message</code> have about 14 fields in total.
  <code>@Relation</code> inside <code>ChatWithMessage</code> class doesn't work, because it returns a list of all messages.</p>