title: Bad query One-to-many relationship room
body: <p>I have problem with room query. I have Theme data class, that have id as primary key:</p>
  <pre><code>@Entity(tableName = &quot;themes_table&quot;)
  data class Theme(
          @PrimaryKey
          var id: String = &quot;&quot;,
          var specialityId: String = &quot;&quot;,
          var details: String = &quot;&quot;,
          var lastUpdated: Long = -1,
          var title: String = &quot;&quot;
  )
  </code></pre>
  <p>and i have Question data class, that have field themeIds (ArrayList):</p>
  <pre><code>@Entity(tableName = &quot;questions_table&quot;)
  data class Question(
          val correctAnswer: String = &quot;&quot;,
          @PrimaryKey
      val id: String = &quot;&quot;,
          val specialityId: String = &quot;&quot;,
          val imageFileName: String = &quot;&quot;,
          val imageLastUpdated: String = &quot;&quot;,
          val lastUpdated: Long = -1,
          var isFavourite: Boolean = false,
          var isExamined: Boolean = false,
          var isLearned: Boolean = false,
          var isCorrect: Boolean = false,
          var isMistake: Boolean = false,
          var selectedAnswer: String = &quot;&quot;,
      val order: Int = -1,
          val text: String = &quot;&quot;,
          @TypeConverters(ArrayListConverter::class)
      val themeIds: ArrayList&lt;String&gt; = arrayListOf(),
          @TypeConverters(MapConverter::class)
      var variants: MutableMap&lt;String, String&gt; = mutableMapOf()
  ): Serializable
  </code></pre>
  <p>I want to get list of themes with questions like this:</p>
  <pre><code>data class ThemeWithQuestions(
          @Embedded
          var theme: Theme,
          @Relation(parentColumn = &quot;id&quot;, entityColumn = &quot;themeIds&quot;, entity = Question::class)
          var questionsList: MutableList&lt;Question&gt; = mutableListOf()
  )
  
  @Transaction()
  @Query(&quot;SELECT * FROM themes_table&quot;)
  fun getThemesWithQuestions(): MutableList&lt;ThemeWithQuestions&gt;
  </code></pre>
  <p>But this query get only themes, questionsList always is empty. Can problem be in this query ? Should i put &quot;IN&quot; statement to it ? How i can resolve it ?</p>