成功捷徑,貴在堅(jiān)持
          人為善,福雖未至禍已遠(yuǎn)離; 人為惡,禍雖未至福已遠(yuǎn)離
          (轉(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ò)。
          posted on 2006-10-26 14:15 選寶網(wǎng)an9 閱讀(345) 評(píng)論(0)  編輯  收藏 所屬分類: FRAMEWORK
          主站蜘蛛池模板: 普宁市| 石河子市| 城市| 微山县| 金门县| 楚雄市| 沭阳县| 民勤县| 浑源县| 乡宁县| 思南县| 汶川县| 曲麻莱县| 岚皋县| 昔阳县| 荔波县| 文山县| 保德县| 那坡县| 新邵县| 从化市| 马尔康县| 榕江县| 江川县| 曲水县| 大安市| 临夏县| 富民县| 南通市| 娱乐| 宣威市| 光山县| 万全县| 金昌市| 南靖县| 新田县| 普安县| 景泰县| 弋阳县| 湘阴县| 马公市|