private BeanConfig getUserBeanConfig() { // programmatic configuration for the bean... (no annotation or XML) BeanConfig config = new BeanConfig(User.class, "Users"); config.pk("id", DBTypes.AUTOINCREMENT); config.field("username", DBTypes.STRING); config.field("birthdate", "bd", DBTypes.DATE); // note that the database column name is different config.field("status", new EnumValueType(User.Status.class)); config.field("deleted", DBTypes.BOOLEANINT); config.field("insertTime", "insert_time", DBTypes.TIMESTAMP).defaultToNow("insertTime"); return config; } // create table Users(id integer primary key auto_increment, // username varchar(25), bd datetime, status varchar(20), // deleted tinyint, insert_time timestamp)