Duplicate “id” column with DBFlow tables and Stetho

喜你入骨 提交于 2019-12-31 01:25:39

问题


I'm writing an application for Android using DBFlow as ORM library. So, here is one of my tables model:

@Table(database = Database.class)
public class Language extends BaseModel {
    @PrimaryKey(autoincrement = true)
    long id;

    @Column
    String key;

    @Column
    String title;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    /* .. Other setters and getters .. */
}

Everything works pretty good, but when I take a look at my DB inspector (I'm using Stetho), I can see 2 identical "id" column:

Its a little bit embarrassing and redundantly.. Isn't it? Is it OK, and what is the cause of this behavior? And if it is not OK, how can I do it right?


回答1:


So, looks like its Stetho-side feature/bug (according this issue). Just ignore it in production.



来源:https://stackoverflow.com/questions/43725377/duplicate-id-column-with-dbflow-tables-and-stetho

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!