I am trying to go into the room, but the layout of my table was like this:
CREATE TABLE cache(key text, content text, time integer);
Entity:
@Entity(tableName = "cache")
public class Cache{
public Integer id;
public String key;
public String content;
public Integer time;
}
No primary key was declared explicit, an error occurred during assembly:
An entity must have at least 1 field annotated with @PrimaryKey
I tried adding a primary key to the table, but sqlite doesn't seem to support this, can anyone help me?
source
share