I have simple data object that I want to insert into room database but as I am using auto increment on my primary key I am doing it as below
@Dao
interface T1Dao {
@Query("INSERT INTO tbl_t1(data1, data2) VALUES ( :T1.data1, :T1.data2) ")
fun insert(note: T1): Long
}
I have many properties in T1 so I don't want pass them separately if possible. In above example I am just showing two properties.