0

I try yo use Room with Kotlin and RxJava 2.

I have an entity with a string primary key and I would like to be notified when values are updated but I receive new value from flowable even if the value isn't updated when I had whatever value.

Entity :

@Entity
class MarketSummaryModel(@PrimaryKey var marketName: String)...

Dao :

@Dao
interface MarketSummaryDao {
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun insert(marketSummaryModel: MarketSummaryModel)

@Query("select * from MarketSummaryModel where marketName = :marketName LIMIT 1")
fun getByName(marketName: String): Flowable<MarketSummaryModel>
}
BenjaminBihr
  • 1,252
  • 2
  • 10
  • 15

0 Answers0