重复的"id" DBFlow表和Stetho列 [英] Duplicate "id" column with DBFlow tables and Stetho

查看:111
本文介绍了重复的"id" DBFlow表和Stetho列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用DBFlow作为ORM库编写Android应用程序.因此,这是我的表格模型之一:

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?

推荐答案

所以,看起来像它的Stetho侧功能/错误(根据

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

这篇关于重复的"id" DBFlow表和Stetho列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆