美文网首页Android进阶
greenDao Duplicate property ordi

greenDao Duplicate property ordi

作者: honaf | 来源:发表于2020-07-24 18:16 被阅读0次

XXXDao中Properties的一些字段属性都有给字段排序号,比如new Property的第一个参数

 public static final Property CREATE_TIME= new Property(15, Integer.class, "createTime", false, "create_time");

查看源码就知道第一个字段是ordinal

    public Property(int ordinal, Class<?> type, String name, boolean primaryKey, String columnName) {
        this.ordinal = ordinal;
        this.type = type;
        this.name = name;
        this.primaryKey = primaryKey;
        this.columnName = columnName;
    }

所以出现这个错误,就说明你定义的一些字段用了重复的ordinal

相关文章

网友评论

    本文标题:greenDao Duplicate property ordi

    本文链接:https://www.haomeiwen.com/subject/ivdslktx.html