title: What is the most convenient way to deal with nested objects in Room?
body: <p>I want to save the server’s response in database (class Parent). The json has nested object, which also should be saved in database in new table (class Nested). The problem is what I don’t know how to write class Parent and ParentDao to make it use NestedDao</p>
  
  <pre><code>@Entity
  data class Parent(
      @PrimaryKey(autoGenerate = true)
      var id: Long? = null,
  
      @SerializedName(«nested»)
      val homeTeam: Nested,
      //other fields
   )
  
  @Entity
  data class Nested(
       @PrimaryKey(autoGenerate = true)
       var nestedId: Long? = null,
  
       @SerializedName("name")
       val name: String,
       //other fields
    )
  
  @Dao
  interface ParentDao {
      @Query("SELECT * FROM parent»)
      fun getData(): Single&lt;List&lt;Parent&gt;&gt;
  
     @Insert
      fun insert(matches: List&lt;Parent&gt;)
  }
  </code></pre>
  
  <p>This gives me an error: <strong>Cannot figure out how to save this field into database. You can consider adding a type converter for it</strong>.</p>
  
  <p>So, what should I do to save and query Parent with Nested at once?</p>