问题是查询返回除“ id”以外的所有列
我使用fts4,并在文档中说:
启用了FTS的表始终使用INTEGER类型的主键,并且其列名称为“ rowid”。如果您的FTS表支持的实体定义了主键,则它必须使用该类型和列名。
这是我的实体类:
@Fts4
@Entity(tableName = "projects")
public class Project {
@ColumnInfo(name = "rowid")
@PrimaryKey(autoGenerate = true)
private int id;
private String name;
@ColumnInfo(name = "start_date")
private String startDate;
@ColumnInfo(name = "end_date")
private String endDate;
private String description;
@ColumnInfo(name = "icon_path")
private String iconPath;
private long budget;
public Project(String name, String startDate, String endDate, String description, String iconPath, long budget) {
this.name = name;
this.startDate = startDate;
this.endDate = endDate;
this.description = description;
this.iconPath = iconPath;
this.budget …Run Code Online (Sandbox Code Playgroud)