Room. Не работает запрос DISTINCT
Не могу выполнить запрос. Нужно получить таблицу Result в итоге.
@Query("SELECT DISTINCT name FROM User")
fun getAllUsers(): LiveData<List<User>>
data class User(
@PrimaryKey(autoGenerate = true)
var id: Long = 0,
var dataId: Int = 0,
var name: String = "",
var userId: Long = 0
)
The columns returned by the query does not have the fields [id,dataId,userId] in com.example.xxxxx.domain.entity.User even though they are annotated as non-null or primitive. Columns returned by the query: [name]
