The NoteBook of EricKong

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            611 Posts :: 1 Stories :: 190 Comments :: 0 Trackbacks

          常用鏈接

          留言簿(11)

          我參與的團隊

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

           1,檢查你的hibernate.cfg.xml文件中是否添加了  <mapping resource="xxxx.hbm.xml"/>
          2,檢查你的hibernate.cfg.xml文件中的相關聯的兩個<mapping resource=""/>的順序,可能有其中一個需要引用另一個,但是另一個卻還沒有編譯,就是說被用作外鍵的表要放在前面
          3,檢查你的*.hbm.xml文件名是否正確
          4, 檢查你的*.hbm.xml里面類全名
          posted on 2010-05-12 15:24 Eric_jiang 閱讀(21611) 評論(8)  編輯  收藏 所屬分類: Hibernate

          Feedback

          # re: 關于An association from the table refers to an unmapped class 2011-06-13 23:36 bujidelebaba
          頂。我一個個對照下去發現原來是hbm.xml里的類全名寫錯了  回復  更多評論
            

          # re: 關于An association from the table refers to an unmapped class 2011-06-13 23:40 bujidelebaba
          哎,改了也還是不行不知道是哪里的問題  回復  更多評論
            

          # re: 關于An association from the table refers to an unmapped class 2011-06-14 01:06 bujidelebaba
          問題終于解決了,我來分享一下我的問題,我的.hbm.xml是我利用database explore下的反向工程自動生成的,是放在src目錄下的,后來我轉移到了自建的bean目錄下,未將.hbm.xml中的class改正,如果放在src下默認只有類名,如<class="User">,我將它改成我現在的目錄<class="bean.User">就OK了  回復  更多評論
            

          # re: 關于An association from the table refers to an unmapped class[未登錄] 2012-09-23 11:29 ff
          我還是沒有找到哪里的錯  回復  更多評論
            

          # re: 關于An association from the table refers to an unmapped class 2012-12-20 11:19 姓名
          我說一下我的錯誤。主要是包弄錯了。<hibernate-mapping package="***.***">看看你是不是沒有定義包名而下面用到的class = “**”沒有用包名。我找了很長時間才知道。也是比較笨~  回復  更多評論
            

          # re: 關于An association from the table refers to an unmapped class 2013-01-10 17:17 ljmzy
          @姓名
          是的,我也犯錯了!該死!  回復  更多評論
            

          # re: 關于An association from the table refers to an unmapped class 2013-09-17 10:51 趙才會
          hibernate.cfg.xml文件沒配置  回復  更多評論
            

          # re: 關于An association from the table refers to an unmapped class 2014-12-22 19:38 aiko
          頂 我是**.hbm.xml中的類全名寫錯了  回復  更多評論
            

          主站蜘蛛池模板: 仲巴县| 砀山县| 司法| 浏阳市| 泗水县| 揭东县| 汕头市| 鹤峰县| 犍为县| 东乡县| 呼图壁县| 兴文县| 辉县市| 黔西| 呈贡县| 神池县| 中卫市| 曲周县| 浮梁县| 华容县| 都兰县| 阿拉善右旗| 炎陵县| 玉环县| 安化县| 长兴县| 永昌县| 马龙县| 昭觉县| 江津市| 庆云县| 衡阳市| 探索| 雅安市| 庆城县| 鲁山县| 临泽县| 陆川县| 青龙| 三明市| 日照市|