我的DB(.sqlite3)中有布尔列。它可能是0或1。
public static final String DISABLE_CATEGORY = "disable_category";
@DatabaseField(columnName = DISABLE_CATEGORY)
private boolean disable;
如何将值更改为' t'或者' f'?
答案 0 :(得分:2)
尝试将布尔值更改为布尔值
@DatabaseField(canBeNull = false, defaultValue = "true")
private Boolean mIsEnabled;
答案 1 :(得分:0)
尝试将布尔值更改为布尔值
@DatabaseField(columnName = Database.TABLE.User.isCustomer)
public boolean isCustomer ;(cursor.getInt(cursor.getColumnIndex(Database.TABLE.User.isCustomer))==0)?false:true,