J'ai une méthode annotée avec @Transaction dans ma classe de DAO, qui est à l'origine de l'erreur suivante:Chambre: erreur de réception lors de l'utilisation @Transaction
A DAO method can be annotated with only one of the following:Insert,Delete,Query,Update
Voici ma classe:
@Dao interface Dao {
@Insert(onConflict = REPLACE) fun insertList(chacaras: List<String>)
@Query("SELECT * FROM chacara WHERE cityId = :cityId")
fun getListOfCity(cityId: String): LiveData<List<String>>
@Delete fun deleteList(chacaraList: List<String>)
@Transaction
fun updateList(list: List<String>){
deleteList(list)
insertList(list)
}
}
Lorsque je supprime la méthode annotée avec @Transaction, elle se compile normalement. Y a-t-il une solution à ce problème?