成功捷徑,貴在堅持
          人為善,福雖未至禍已遠離; 人為惡,禍雖未至福已遠離
          (轉載)這個是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 閱讀(349) 評論(0)  編輯  收藏 所屬分類: FRAMEWORK
          主站蜘蛛池模板: 洪湖市| 孟连| 长宁区| 青海省| 思茅市| 茌平县| 藁城市| 炎陵县| 高陵县| 邮箱| 瑞金市| 永昌县| 浦东新区| 资源县| 娄底市| 若尔盖县| 瑞金市| 临沂市| 介休市| 运城市| 城固县| 淅川县| 张北县| 乃东县| 上犹县| 青河县| 莱阳市| 巍山| 日喀则市| 宣城市| 临夏县| 清新县| 乌拉特后旗| 云龙县| 景东| 汪清县| 江都市| 五莲县| 新化县| 凌云县| 信宜市|