zoukankan      html  css  js  c++  java
  • An association from the table user_ product refers to an unmapped class: com. hiber.pojo. User

    使用Hibernate框架实现多对多实体关系时,发现出现下图错误:

     

     错误内容没有建立映射。

     解决方案:影射文件hibernate.cfg.xml中添加使用到的类的映射代码:

           以User类为例:

           <mapping resource="com/hiber/pojo/User.hbm.xml"/>

    hibernate.cfg.xml代码:

    User.hbm.xml代码:

    希望能够帮助到大家~

  • 相关阅读:
    DP -- 递推
    二分查找题
    动态规划
    二分专题
    并查集
    三分法
    二分法
    插入排序
    排序小结
    Go go.mod入门
  • 原文地址:https://www.cnblogs.com/jhyp/p/12869996.html
Copyright © 2011-2022 走看看