appfuse1.8.0安装app_user.enabled data type (1111, ‘bit’) not recognized and will be ignored错误解决办法

appfuse1.8.0安装app_user.enabled data type (1111, ‘bit’) not recognized and will be ignored错误解决办法
(转载)这个是DBunit的问题,1.8以上的版本才有这个问题!

只要修改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;
    }

就加了这一点,就可以了,

其实 type="yes_no" hibernate会映射成CHAR(1) , 而type="boolean" 它会映射成BIT , 估计dbunit在插入sample-data.xml的时候会出错。

你可能感兴趣的:(appfuse1.8.0安装app_user.enabled data type (1111, ‘bit’) not recognized and will be ignored错误解决办法)