Vivek Sharma
01/10/2022, 4:43 PM@Entity
data class Note(
val title: String,
val content: String,
val timestamp: Long,
val color: Int,
@PrimaryKey val id: Int? = null
)
and when I create Note object, and passing null
to id
, what room will assign to it?
In my case it is assigning 1, 2, 3, 4...
like it is autoGenerating, is this correct what I am thinking?
Though I am NOT having autoGenerate = true
in @PrimaryKey
yigit
01/25/2022, 4:51 PMVivek Sharma
01/25/2022, 6:37 PM