title: Multiple tables with same type of objects in Room database
body: <p>I'm using Room as the database for the app. I have a scenario where an <code>Object</code> of a certain type needs to be stored in separate tables. As an example, lets take the <code>Object</code> called <code>Book.java</code> </p>
  
  <p>Now, I want to have two SQL tables:</p>
  
  <ul>
  <li>Books_Read</li>
  <li>Books_To_Read </li>
  </ul>
  
  <p><em>ignore any naming conventions for SQL DB please - this is just an example</em></p>
  
  <p><strong>Problem</strong> </p>
  
  <p>Normally, one would just use <code>@Entity(tableName = "Books_Read")</code> in the <code>Book.java</code> class and have a <code>DAO</code> class that will use that table name. </p>
  
  <p>The thing is; how would I then be able to use the same <code>Book.java</code> class to store in the <code>Books_To_Read</code> table? Since I already defined <code>@Entity(tableName = "Books_Read")</code> as part of the <code>Book.java</code> class and I see no where to define the <code>Books_To_Read</code> table for the <code>Book.java</code> class </p>
  
  <p>The only solution I was able to come up with, which seems a little hackery and unnessasery, was to create a new class - let's call it <code>BookToRead.java</code>  that extends <code>Book.java</code> and define <code>@Entity(tableName = "Books_To_Read")</code> in the class. </p>
  
  <p><strong>Question</strong></p>
  
  <p>Is there a better way to do this or is this the expected way to handle it? </p>