成功捷径,贵在坚持
人为善,福虽未至祸已远离; 人为恶,祸虽未至福已远离
(转载)这个是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的时候会出错。
posted on 2006-10-26 14:15 选宝网an9 阅读(327) 评论(0)  编辑  收藏 所属分类: FRAMEWORK

只有注册用户登录后才能发表评论。


网站导航: