Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Duplicate "id" column with DBFlow tables and Stetho

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?

like image 632
tehcpu Avatar asked Feb 04 '23 13:02

tehcpu


1 Answers

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

like image 149
tehcpu Avatar answered Feb 07 '23 12:02

tehcpu