GreenDao在列中的单词之间自动加_

1、第一种情况,原字段(属性、列)是 驼峰式命名法

@Entity
public class Employee {
@Id(autoincrement = true)
private Long id; //主键
private long companyId; //指向Company主键
private String employeeName; //雇员姓名
private int salary; //薪水


}


最终形成的db文件,用软件“SQLite Expert Personal 5 - 64bit”打开如下

1、第二种情况原字段(属性、列)是,以_相连的,

@Entity
public class WTDetailTableBean {

@Id
private String TICKET_ID; //票号ID
private String TICKET_NO; //票号
private String OPERATION_OBJECT_ID; //操作对象ID
private String OPERATION_OBJECT; //操作对象

}

最终形成的db文件,用软件“SQLite Expert Personal 5 - 64bit”打开如下,2个_相连的。


 



原文地址:https://www.cnblogs.com/YangBinChina/p/8288159.html