ORMLite column with default
问题 I have a non null column defined with a default: @DatabaseField(dataType = DataType.TIME_STAMP, columnDefinition = "DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL") private Date createdDate; When trying to save a row with the createdDate field unset, I get the following error: [SQLITE_CONSTRAINT_NOTNULL] A NOT NULL constraint failed (NOT NULL constraint failed: ORMLite is probably trying to explicitly insert a NULL value into the field. Adding persisted = false to the annotation avoids this, but