隨筆 - 0  文章 - 29  trackbacks - 0
          <2015年1月>
          28293031123
          45678910
          11121314151617
          18192021222324
          25262728293031
          1234567

          從2008年12月2日起訪問(wèn)者:
          free hit counter
          學(xué)習(xí)書(shū)籍、視頻下載

          留言簿

          文章分類(lèi)(16)

          文章檔案(17)

          收藏夾(5)

          Eclipse+MyEclipse

          JAVA 相關(guān)工具下載網(wǎng)址

          JSP服務(wù)器

          Struts2

          weblogic

          學(xué)習(xí)網(wǎng)站

          數(shù)據(jù)庫(kù)

          電子商務(wù)

          搜索

          •  

          最新評(píng)論

          現(xiàn)象:
          使用hql="from person" 出現(xiàn)" person is not mapped " 錯(cuò)誤

          配置文件如下:
          <hibernate-mapping>
          ????<class name="src.Person"
          ?????????? table="person">
          ????????<id name="name"/>
          ??????
          ????????<property name="password"/>
          ????</class>
          </hibernate-mapping>


          原因:

          hql是寫(xiě)的是PO對(duì)象,不是table名

          故改為配置文件中的紅色部分的類(lèi)名即可。

          posted on 2008-07-20 15:50 JEEF WANG 閱讀(28002) 評(píng)論(15)  編輯  收藏 所屬分類(lèi): Hibernate

          FeedBack:
          # re: "table" is not mapped 解決方法 2008-08-15 22:03 陳輝
          thank you  回復(fù)  更多評(píng)論
            
          # re: "table" is not mapped 解決方法 2008-08-20 11:06 amo
          我也碰到這樣的問(wèn)題,照著上面的做法改了后就成功了。謝謝上面各位  回復(fù)  更多評(píng)論
            
          # re: "table" is not mapped 解決方法 2008-09-28 10:12 i_mwaitingfory
          <class name="com.demo.server.Tt" table="tt" schema="dbo" catalog="ss">

          我是這樣改的啊,有映射文件啊,但是用HQL編輯器查詢它還是說(shuō)"tt is not mapped"是怎么回事哦,我運(yùn)行了測(cè)試代碼也是這個(gè)結(jié)果.


          麻煩高手們告訴我一下啊,小妹在此不勝感激,我留了我的博客地址,希望大家?guī)蛶兔Π?nbsp; 回復(fù)  更多評(píng)論
            
          # re: "table" is not mapped 解決方法[未登錄](méi) 2008-12-31 09:50 hehe
          你在appcontext里沒(méi)加下面這個(gè)吧?
          <property name="mappingResources">
          <list>
          <value>com/smartempo/yainfo/po/YaFriendlink.hbm.xml</value>

          </list>
          </property>  回復(fù)  更多評(píng)論
            
          # re: "table" is not mapped 解決方法 2010-09-19 17:08 11111
          謝謝樓主,學(xué)習(xí)了~~~~3q  回復(fù)  更多評(píng)論
            
          # re: "table" is not mapped 解決方法 2010-12-20 15:33 wxf
          # re: "table" is not mapped 解決方法[未登錄](méi) 2011-04-19 17:26 Eagle
          @i_mwaitingfory
          from Tt 而不是tt  回復(fù)  更多評(píng)論
            
          # re: "table" is not mapped 解決方法 2011-07-06 19:39 貝殼里的海
          搞定,就是這樣滴  回復(fù)  更多評(píng)論
            
          # re: "table" is not mapped 解決方法 2011-07-06 19:40 椒江在線
          不錯(cuò)不錯(cuò),就是這樣的  回復(fù)  更多評(píng)論
            
          # re: "table" is not mapped 解決方法 2011-08-18 16:23 王培聰
          你應(yīng)該改成Tt吧  回復(fù)  更多評(píng)論
            
          # re: "table" is not mapped 解決方法 2012-01-04 16:51 567890
          謝謝,自己想了很久都沒(méi)解決,現(xiàn)在總算解決了。原來(lái)是這個(gè)問(wèn)題。。  回復(fù)  更多評(píng)論
            
          # re: "table" is not mapped 解決方法 2012-03-10 22:31 wuchx
          太帥了,成功了  回復(fù)  更多評(píng)論
            
          # re: "table" is not mapped 解決方法 2013-11-18 13:55 張俊
          遇到同樣問(wèn)題,照你做了,OK 。謝謝  回復(fù)  更多評(píng)論
            
          # re: "table" is not mapped 解決方法[未登錄](méi) 2015-01-21 14:59 qq
          @567890
          什么問(wèn)題  回復(fù)  更多評(píng)論
            
          # re: "table" is not mapped 解決方法[未登錄](méi) 2016-02-29 14:34 cc
          謝謝!  回復(fù)  更多評(píng)論
            

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 宣城市| 什邡市| 陵水| 仁怀市| 平山县| 腾冲县| 新建县| 奉节县| 乌兰浩特市| 遂昌县| 沙雅县| 宝鸡市| 镇宁| 原阳县| 邵阳县| 高州市| 南陵县| 晋州市| 秀山| 炎陵县| 万山特区| 汝州市| 黎川县| 兰溪市| 桐乡市| 长阳| 南投市| 内江市| 平阳县| 九龙城区| 甘洛县| 奉贤区| 交口县| 双桥区| 承德县| 霍山县| 卢氏县| 西华县| 丰城市| 资兴市| 化州市|