0

i have a data class that serve as a model for sending and receiving api call

data class NetworkLiveScore(
    val status: String,
    val team_1: TeamOne?,
    val team_2: TeamTwo?,
    val score: Scores,
)

data class TeamOne(
    val name: String,
)

data class TeamTwo(
    val name: String,
)

data class Scores(
    val full_time: FullTime,

)

data class FullTime(
    val team_1: String,
    val team_2: String,
)

and when i tried inserting it into a roomdb i get type conversion error and i've tried converting it but i just dont seem to get it. Please can anyone help me out.

RJnr
  • 670
  • 6
  • 19
  • Use [This](https://stackoverflow.com/a/48260739/4168607) you need to change the type. – ADM Jan 02 '21 at 05:14
  • this helped [this](https://stackoverflow.com/questions/44580702/android-room-persistent-library-how-to-insert-class-that-has-a-list-object-fie/48260739#48260739) as ADM pointed out. – RJnr Jan 07 '21 at 01:22
  • it's already answered, check it out [here](https://stackoverflow.com/questions/44580702/android-room-persistent-library-how-to-insert-class-that-has-a-list-object-fie/48260739#48260739) – RJnr Feb 17 '22 at 15:21

0 Answers0