I am trying to run a select query on Room. I have the following Dao:
@Dao
abstract class TopicDao {
@Query("SELECT * FROM Topic WHERE Id = :topicId")
abstract fun getTopicModel(topicId: String): LiveData<TopicUiModel>
}
the following Entity:
@Entity
data class Topic(
@PrimaryKey
val Id: String,
val Name: String,
)
and the following data model:
data class TopicUiModel(
val Id: String,
val Name: String,
val Selected: Boolean,
)
However I am getting the following error:
"There is a problem with the query: [SQLITE_ERROR] SQL error or missing database (no such column: Selected)"
The error makes sense but how do I make room to ignore this field?