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

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

          <bdo id='uOzDs'></bdo><ul id='uOzDs'></ul>
      1. <legend id='uOzDs'><style id='uOzDs'><dir id='uOzDs'><q id='uOzDs'></q></dir></style></legend>

      2. <tfoot id='uOzDs'></tfoot>

        在 JPA 中设置列​​的默认值

        时间:2023-07-26

          <tbody id='SfNYS'></tbody>

        <tfoot id='SfNYS'></tfoot>

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

            1. <i id='SfNYS'><tr id='SfNYS'><dt id='SfNYS'><q id='SfNYS'><span id='SfNYS'><b id='SfNYS'><form id='SfNYS'><ins id='SfNYS'></ins><ul id='SfNYS'></ul><sub id='SfNYS'></sub></form><legend id='SfNYS'></legend><bdo id='SfNYS'><pre id='SfNYS'><center id='SfNYS'></center></pre></bdo></b><th id='SfNYS'></th></span></q></dt></tr></i><div id='SfNYS'><tfoot id='SfNYS'></tfoot><dl id='SfNYS'><fieldset id='SfNYS'></fieldset></dl></div>
                  <bdo id='SfNYS'></bdo><ul id='SfNYS'></ul>
                  <legend id='SfNYS'><style id='SfNYS'><dir id='SfNYS'><q id='SfNYS'></q></dir></style></legend>
                • 本文介绍了在 JPA 中设置列​​的默认值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  是否可以为 JPA 中的列设置默认值,如果,如何使用注释来完成?

                  Is it possible to set a default value for columns in JPA, and if, how is it done using annotations?

                  推荐答案

                  实际上在 JPA 中是可能的,虽然使用 @Column<的 columnDefinition 属性有点小技巧/code> 注解,例如:

                  Actually it is possible in JPA, although a little bit of a hack using the columnDefinition property of the @Column annotation, for example:

                  @Column(name="Price", columnDefinition="Decimal(10,2) default '100.00'")
                  

                  这篇关于在 JPA 中设置列​​的默认值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                • <legend id='YICB3'><style id='YICB3'><dir id='YICB3'><q id='YICB3'></q></dir></style></legend>

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

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

                          <tfoot id='YICB3'></tfoot>