我为android应用程序创建了一个具有以下字段的bean
@DatabaseField(generatedId=true)
private int id;
@DatabaseField
private String name;
@DatabaseField(unique=true)
private String emailId;
@DatabaseField
private String mobile;
@DatabaseField(unique=true)
private String loginName;
@DatabaseField
private String loginPassword;
@DatabaseField
private String confirmPassword;
@DatabaseField
private String securityQuestion;
@DatabaseField
private String securityPassword;
@DatabaseField
private String transactionPassword;
@DatabaseField
private String uac;
但是,当我在 Eclipse IDE 中使用 Questoid SQLite 管理器查看数据库表时,我看不到以与 bean 中声明的顺序相同的顺序创建的列,而是看到如下所示的内容:
CREATE TABLE user (confirmPassword VARCHAR, emailId VARCHAR, uac VARCHAR,
loginPassword VARCHAR, mobile VARCHAR, name VARCHAR, securityPassword VARCHAR,
transactionPassword VARCHAR id INTEGER PRIMARY KEY AUTOINCREMENT);
从可读性和调试的角度来看,这个顺序非常困难。有没有办法克服这个问题?