An association from the table * refers to an unmapped class: *



An association from the table * refers to an unmapped class: *

 

解決方法:
class路徑沒寫正確。
有三個地方需要注意
1、<hibernate-mapping package="">
2、<class name="com.model.RoleInfo">
3、<set name="userInfos" table="ROLEOFUSER" inverse="false">
            <key column="ROLEID">
            </key>
            <many-to-many column="USERID" class="com.model.UserInfo" />
        </set>
       
       
        建議:最好寫在第一個地方,這樣下面就可以不用寫很長的包名了

發佈了15 篇原創文章 · 獲贊 3 · 訪問量 12萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章