title: Room DB - Running insertion into M2M Relation inside Transaction
body: <p>I am inserting a new book into my book table and after trying to assign it to a many-to-many relation table. Imo this should run in a transaction. 
  (Because if the m2m insertion fails, the information about the realtionship is lost). My code now looks as follows and fails as i cannot access the <code>BookUserXRefDao.insert(bookUser);</code> query due to static context errors.</p>
  
  <p>Is there an easy way to fix this?</p>
  
  <pre><code>@Transaction
  public void insertBook(Book theBook, List&lt;Integer&gt; userIds){
      long newBookId= insert(theBook);
      //Insert into the m2m relation
      BookUserXRef[] bookUser = new BookUserXRef[userIds.size()];
      for (int i = 0; i &lt; userIds.size(); i++) {
          BookUserXRef[i] = new BookUserXRef(newBookId,userIds.get(i));
      }
      BookUserXRefDao.insert(bookUser);
  }
  </code></pre>