关于An association from the table xxx refers to an unmapped class xx
来源:互联网 发布:龙岗淘宝培训 编辑:程序博客网 时间:2024/04/30 05:04
1.表xxx 关联一个映射类:class xx
2.检查类名xx是否正确
<many-to-one name="category" class="com.vken.examples.Category"
outer-join="true">
<column name="category_id"></column>
</many-to-one>
ps:(从别处转载)
1,检查你的hibernate.cfg.xml文件中是否添加了 <mapping resource="xxxx.hbm.xml"/>
2,检查你的hibernate.cfg.xml文件中的相关联的两个<mapping resource=""/>的顺序,可能有其中一个需要引用另一个,但是另一个却还没有编译,就是说被用作外键的表要放在前面
3,检查你的*.hbm.xml文件名是否正确
4, 检查你的*.hbm.xml里面类是否正确
解决方法:
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>
0 0
- 关于An association from the table xxx refers to an unmapped class xx
- An association from the table * refers to an unmapped class: *
- An association from the table refers to an unmapped class
- An association from the table * refers to an unmapped class: *
- An association from the table refers to an unmapped class
- org.hibernate.MappingException:An association from the table XX refers to an unmapped class
- 关于An association from the table refers to an unmapped class
- Hibernate:关于An association from the table refers to an unmapped class
- 关于An association from the table refers to an unmapped class
- 关于An association from the table refers to an unmapped class
- 关于An association from the table refers to an unmapped class
- 关于An association from the table refers to an unmapped class
- org.hibernate.MappingException: An association from the table tuser refers to an unmapped class: Role
- 映射异常: An association from the table tb_baoxiao refers to an unmapped class: int
- An association from the table work_output refers to an unmapped class: org.ejs.sys.model.Part
- An association from the table PersonAddress refers to an unmapped class
- 映射异常: An association from the table TBL_TRAIN_COURSE_MONTH_PLAN refers to an unmapped class
- An association from the table suppliersuserinfo refers to an unmapped class
- ubuntu下caffe手写数字识别问题、python接口测试
- curl命令
- 自动执行和管理 Windows 操作系统部署
- python 低通滤波
- Nginx的配置和用Upstream负载均衡总结
- 关于An association from the table xxx refers to an unmapped class xx
- ubuntu更新源配置
- 《SQL必知必会》(8-15)
- 《从零开始学Swift》学习笔记(Day 49)——扩展声明
- C语言再学习 -- 段错误(核心已转储)
- 抽象类与接口的区别
- Mysql数据库远程连接问题
- 自动执行和管理 Windows 操作系统部署
- hadoop-2.7.0 运行中遇到的一些问题