appfuse1.8.0安裝app_user.enabled data type (1111, ‘bit’) not recognized and will be ignored錯(cuò)誤解決辦法
(轉(zhuǎn)載)這個(gè)是DBunit的問(wèn)題,1.8以上的版本才有這個(gè)問(wèn)題!只要修改User.java
/**
???? * @return Returns the enabled.
???? * @hibernate.property column="enabled"?
???? */
??? public Boolean getEnabled() {
??????? // isEnabled doesnt' work for copying properties to Struts ActionForms
??????? return enabled;
??? }
修改成
/**
???? * @return Returns the enabled.
???? * @hibernate.property column="enabled" type="yes_no"
???? */
??? public Boolean getEnabled() {
??????? // isEnabled doesnt' work for copying properties to Struts ActionForms
??????? return enabled;
??? }
就加了這一點(diǎn),就可以了,
其實(shí) type="yes_no" hibernate會(huì)映射成CHAR(1) , 而type="boolean" 它會(huì)映射成BIT , 估計(jì)dbunit在插入sample-data.xml的時(shí)候會(huì)出錯(cuò)。