Repository: android/nowinandroid
Issue: KSP warnings related to room queries populated return type not being transactional

While building the project, there are some KSP warnings related to queries with populated return type that marked with `@Relation`. Suggested that it is desired that these methods to be annotated with `@Transaction`

`
[ksp] C:/Users/User/Desktop/nowinandroid-main/core-database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/EpisodeDao.kt:36: The return value includes a POJO with a @Relation. It is usually desired to annotate this method with @Transaction to avoid possibility of inconsistent results between the POJO and its relations. See https://developer.android.com/reference/androidx/room/Transaction.html for details.
`

`
[ksp] C:/Users/User/Desktop/nowinandroid-main/core-database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/NewsResourceDao.kt:43: The return value includes a POJO with a @Relation. It is usually desired to annotate this method with @Transaction to avoid possibility of inconsistent results between the POJO and its relations. See https://developer.android.com/reference/androidx/room/Transaction.html for details.
`

`[ksp] C:/Users/User/Desktop/nowinandroid-main/core-database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/NewsResourceDao.kt:61: The return value includes a POJO with a @Relation. It is usually desired to annotate this method with @Transaction to avoid possibility of inconsistent results between the POJO and its relations. See https://developer.android.com/reference/androidx/room/Transaction.html for details.
`

It can be fixed by adding `@Transaction` annotation to related query methods like:

```kotlin
@Transaction
@Query(
    value = """
        SELECT * FROM news_resources
        ORDER BY publish_date DESC
"""
)
fun getNewsResourcesStream(): Flow<List<PopulatedNewsResource>>
```

Changed files:
core-database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/NewsResourceDao.kt
core-database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/EpisodeDao.kt

diff --git a/core-database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/EpisodeDao.kt b/core-database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/EpisodeDao.kt
index 40da3f2c..7e823e22 100644
--- a/core-database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/EpisodeDao.kt
+++ b/core-database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/EpisodeDao.kt
@@ -32,6 +32,7 @@ import kotlinx.coroutines.flow.Flow
  */
 @Dao
 interface EpisodeDao {
+    @Transaction
     @Query(value = "SELECT * FROM episodes")
     fun getEpisodesStream(): Flow<List<PopulatedEpisode>>
 
diff --git a/core-database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/NewsResourceDao.kt b/core-database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/NewsResourceDao.kt
index f03b1704..8200712b 100644
--- a/core-database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/NewsResourceDao.kt
+++ b/core-database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/NewsResourceDao.kt
@@ -34,6 +34,7 @@ import kotlinx.coroutines.flow.Flow
  */
 @Dao
 interface NewsResourceDao {
+    @Transaction
     @Query(
         value = """
             SELECT * FROM news_resources
@@ -42,6 +43,7 @@ interface NewsResourceDao {
     )
     fun getNewsResourcesStream(): Flow<List<PopulatedNewsResource>>
 
+    @Transaction
     @Query(
         value = """
             SELECT * FROM news_resources