• <tfoot id='RX71o'></tfoot>
      <bdo id='RX71o'></bdo><ul id='RX71o'></ul>
    <i id='RX71o'><tr id='RX71o'><dt id='RX71o'><q id='RX71o'><span id='RX71o'><b id='RX71o'><form id='RX71o'><ins id='RX71o'></ins><ul id='RX71o'></ul><sub id='RX71o'></sub></form><legend id='RX71o'></legend><bdo id='RX71o'><pre id='RX71o'><center id='RX71o'></center></pre></bdo></b><th id='RX71o'></th></span></q></dt></tr></i><div id='RX71o'><tfoot id='RX71o'></tfoot><dl id='RX71o'><fieldset id='RX71o'></fieldset></dl></div>
      <legend id='RX71o'><style id='RX71o'><dir id='RX71o'><q id='RX71o'></q></dir></style></legend>

      1. <small id='RX71o'></small><noframes id='RX71o'>

      2. @AttributeOverride 是什么意思?

        时间:2023-09-27
        <tfoot id='piFWC'></tfoot>
          <tbody id='piFWC'></tbody>

        • <bdo id='piFWC'></bdo><ul id='piFWC'></ul>

              <legend id='piFWC'><style id='piFWC'><dir id='piFWC'><q id='piFWC'></q></dir></style></legend>

            1. <i id='piFWC'><tr id='piFWC'><dt id='piFWC'><q id='piFWC'><span id='piFWC'><b id='piFWC'><form id='piFWC'><ins id='piFWC'></ins><ul id='piFWC'></ul><sub id='piFWC'></sub></form><legend id='piFWC'></legend><bdo id='piFWC'><pre id='piFWC'><center id='piFWC'></center></pre></bdo></b><th id='piFWC'></th></span></q></dt></tr></i><div id='piFWC'><tfoot id='piFWC'></tfoot><dl id='piFWC'><fieldset id='piFWC'></fieldset></dl></div>

                <small id='piFWC'></small><noframes id='piFWC'>

                • 本文介绍了@AttributeOverride 是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我目前正在(回来)加快使用 EJB 的速度,而当我离开时,它发生了巨大的变化(到目前为止更好).但是,我遇到了一个我正在努力解决的概念,并且希望更好地理解它,因为它似乎在我们(我工作的地方,而不是我和我脑海中的所有声音)的代码中使用了很多.

                  I'm currently coming (back) up to speed with EJB and while I was away it changed drastically (so far for the better). However, I've come across a concept that I am struggling with and would like to understand better as it seems to be used in our (where I work, not me and all the voices in my head) code quite a bit.

                  这是我在一本书中找到的示例.它是展示如何使用 @EmbeddedId 注释的示例的一部分:

                  Here's the example I've found in a book. It's part of an example showing how to use the @EmbeddedId annotation:

                  @Entity
                  public class Employee implements java.io.Serializable
                  {
                      @EmbeddedId
                      @AttributeOverrides({
                          @AttributeOverride(name="lastName", column=@Column(name="LAST_NAME"),
                          @AttributeOverride(name="ssn", column=@Column(name="SSN"))
                      })
                  
                      private EmbeddedEmployeePK pk;
                  
                      ...
                  }
                  

                  EmbeddedEmployeePK 类是一个相当简单的 @Embeddable 类,它定义了一对 @Columns:lastNamessn.

                  The EmbeddedEmployeePK class is a fairly straightforward @Embeddable class that defines a pair of @Columns: lastName and ssn.

                  哦,我从 Rubinger & 的 O'Reilly 的 Enterprise JavaBeans 3.1 中提取了这个示例.伯克.

                  Oh, and I lifted this example from O'Reilly's Enterprise JavaBeans 3.1 by Rubinger & Burke.

                  提前感谢您能给我的任何帮助.

                  Thanks in advance for any help you can give me.

                  推荐答案

                  也就是说,构成嵌入 id 的属性可能已经预定义(通过显式或隐式映射)列名.通过使用 @AttributeOverride,您的意思是忽略关于它存储在哪一列的其他信息,并使用我在此处指定的信息".

                  It's saying that the attributes that make up the embedded id may have predefined (through explicit or implicit mappings) column names. By using the @AttributeOverride you're saying "ignore what other information you have with regard to what column it is stored in, and use the one I specify here".

                  这篇关于@AttributeOverride 是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:是否可以使用 Java Reflection 打印出父类的属性? 下一篇:为什么我不能从 Java 中另一个包中的继承类调用

                  相关文章

                  最新文章

                • <small id='eDD4k'></small><noframes id='eDD4k'>

                  <tfoot id='eDD4k'></tfoot>

                • <i id='eDD4k'><tr id='eDD4k'><dt id='eDD4k'><q id='eDD4k'><span id='eDD4k'><b id='eDD4k'><form id='eDD4k'><ins id='eDD4k'></ins><ul id='eDD4k'></ul><sub id='eDD4k'></sub></form><legend id='eDD4k'></legend><bdo id='eDD4k'><pre id='eDD4k'><center id='eDD4k'></center></pre></bdo></b><th id='eDD4k'></th></span></q></dt></tr></i><div id='eDD4k'><tfoot id='eDD4k'></tfoot><dl id='eDD4k'><fieldset id='eDD4k'></fieldset></dl></div>

                      <legend id='eDD4k'><style id='eDD4k'><dir id='eDD4k'><q id='eDD4k'></q></dir></style></legend>
                      • <bdo id='eDD4k'></bdo><ul id='eDD4k'></ul>