`
cavonchen
  • 浏览: 210039 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

an association from the table refers to an unmapped class:java.util.set

    博客分类:
  • java
阅读更多

做实验,做着做着出现这个错误,上网搜了一通,发现自己还真傻。。。

         1。检查你的hibernate.cfg.xml文件中是否添加了

              <mapping resource="xxxx.hbm.xml"/>

         2。检查你的hibernate.cfg.xml文件中的相关联的两个<mapping resource=""/>的顺序,可能有其中一个需要引用另一个,但是另一个却还没有编译,就是说被用作外键的表要放在前面

         3。也是最愚蠢的一个(本人目前犯的错误),检查你的CodeAssetSecretLevel.hbm.xml文件名是否正确

 

厉害的是,我的问题原因都不是这些,而是person对address的多对一关系中,我竟然在person类中写成了

Set<Address> addresses = new HashSet<Address>();

搞半天,我才觉悟我这样是写成了person对address的一对多关系了啊。。。改回

Address address ;就行了。。。

糊里糊涂,写错了,害我查到半死。。。。

0
0
分享到:
评论

相关推荐

    解决docker报错The push refers to a repository_docker load

    解决docker报错The push refers to a repository

    SSD7 选择题。Multiple-Choice

    (b) the name of the table, the names of the table's attributes, the data types of the table's attributes, the formats of the table's attributes, and the maximum number of rows that the table can have...

    clojure.java-time:用于Clojure的Java 8 Date-Time API

    Java 8的Date-Time API取代了过时的`java.util.Date`和`java.util.Calendar`,提供了更加清晰、易于使用的API。`clojure.java-time`库通过提供与这些类对应的Clojure记录(records)和协议(protocols),让Clojure...

    大学英语六级翻译提前练:曲艺.docx

    - **是指**:在英语中,可以使用 "refers to" 来表达这一含义,例如 "Quyi refers to folk vocal art forms"。 - **二者兼有**:在翻译时,可以直接使用 "both" 表示同时存在两个元素,如 "in which speech, ...

    C 程序设计教学课件:Chapter 3 class and object.ppt

    It refers to incorporating one class as a part of another, allowing the creation of complex objects from simpler ones. This promotes reusability and modularity in code design. Static members in C++ ...

    英语中常用的连词.pdf

    - `Refers to`:指的是 - `Means`:意思是 - `That is`:那就是 - `Consists of`:由...构成 8. **Summary(总结)**: - `In conclusion`:最后 - `In summary`:总的说来 - `Lastly`:最后 - `Finally`:...

    Data Structures and Algorithms in Java, 5th Edition (Part 3/3)

    Book Description ∗ This newest edition examines fundamental data structures by following a consistent object–oriented ...--This text refers to an out of print or unavailable edition of this title.

    Docker push报错 :denied: requested access to the resource is denied

    在排除没有登录和网络的原因:我还是报的如下错误 原因镜像的名字没有按照...The push refers to repository [docker.io/langxuhao/my_redis] cd1b418d5a74: Pushed ddf2402ca3ea: Pushed 00352274272b: Pushed a0e3c

    s3c2410测试开发程序

    2410init.o(Init) refers to 2410test.o(.text) for Main 2410test.o(.text) refers to 2410lib.o(.text) for Uart_Printf 2410test.o(.text) refers to mmu.o(.text) for MMU_Init 2410test.o(.text) refers to...

    鸢尾花数据

    where each class refers to a type of iris plant. One class is linearly separable from the other 2; the latter are NOT linearly separable from each other. --- Predicted attribute: class of iris ...

    计算机网络第六版答案

    An ISP earns its money by charging each of the the ISPs that connect to the IXP a relatively small fee, which may depend on the amount of traffic sent to or received from the IXP. 15. Google's ...

    System Security Lecture Notes (StonyBrook CSE509)

    1. **Correctness**: Refers to the system functioning as intended, even if there are mistakes or accidents. - Example: RAID 5, which can tolerate disk failures without losing data. 2. **Security**: ...

    epson-rx8130ce芯片手册+linux下的驱动程序

    "linux-3.8.x" refers to the base of the linux kernel source tree. 2. Add the following lines into the drivers/rtc/Kconfig file: config RTC_DRV_RX8130 tristate "Epson RX8130CE" help If you say yes ...

    JAVA面向对象程序设计试题与解析库

    例如,`import java.util.Date;`会导入Date类。 - 这种方式比较适用于导入较少的类。 2. **导入整个包**: - 使用`import`关键字导入一个包下的所有类。例如,`import java.awt.*;`会导入java.awt包下的所有类。 ...

    Live-debug-a-running-Process

    Live debugging of a running process refers to the process of debugging a program that is currently executing, without interrupting its normal operation. This technique is particularly useful when ...

    湖南数据结构模拟试卷两套.docx

    .data structure refers to the way data is organized and structured in a computer program. 1. 如果只想得到 1024 个元素组成的序列中的前 5 个最小元素,那么用()方法最快。 answer: C、堆排序 堆排序是一种...

    asp.net菜单(很简单)

    showhide:function(obj, e, obj2){ //obj refers to drop down menu, obj2 refers to tab menu item mouse is currently over if (this.ie || this.firefox) this.dropmenuobj.style.left=this.dropmenuobj....

    Cisco U DNAAS 题库

    In the context of intent-based networking, "intent" refers to the desired state of the network, defined by the network administrator. The IBN process involves translating these high-level intents into...

    Turbo C++ 3.0[DISK]

    - C++ 2.1 support, including the new nested class specifications, and support of C++ 3.0 templates. - Support for pre-compiled headers for substantial time savings during subsequent recompiles. ...

    Turbo C++ 3.00[DISK]

    - C++ 2.1 support, including the new nested class specifications, and support of C++ 3.0 templates. - Support for pre-compiled headers for substantial time savings during subsequent recompiles. ...

Global site tag (gtag.js) - Google Analytics