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

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

      • <bdo id='sGial'></bdo><ul id='sGial'></ul>
    1. <tfoot id='sGial'></tfoot>
      <legend id='sGial'><style id='sGial'><dir id='sGial'><q id='sGial'></q></dir></style></legend>
    2. 表 'DBNAME.hibernate_sequence' 不存在

      Table #39;DBNAME.hibernate_sequence#39; doesn#39;t exist(表 DBNAME.hibernate_sequence 不存在)

        <tbody id='QG4S4'></tbody>

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

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

    4. <tfoot id='QG4S4'></tfoot>

              <bdo id='QG4S4'></bdo><ul id='QG4S4'></ul>
              <legend id='QG4S4'><style id='QG4S4'><dir id='QG4S4'><q id='QG4S4'></q></dir></style></legend>
                本文介绍了表 'DBNAME.hibernate_sequence' 不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有一个使用 spring data/jpa 的 SpringBoot 2.0.1.RELEASE 应用程序

                I have a SpringBoot 2.0.1.RELEASE application using spring data / jpa

                <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-data-jpa</artifactId>
                </dependency>
                

                但是当我在 Amazon Aurora 数据库中进行更新时,我收到了这个错误:

                But when I do an update in the Amazon Aurora DB, I got this error:

                2018-04-13 09:20 [pool-1-thread-1] 错误 o.h.id.enhanced.TableStructure.execute(148) - 无法读取 hi 值com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法)中不存在表elbar.hibernate_sequence"

                2018-04-13 09:20 [pool-1-thread-1] ERROR o.h.id.enhanced.TableStructure.execute(148) - could not read a hi value com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'elbar.hibernate_sequence' doesn't exist at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                我在要保存的实体中有这个

                I have this in the entity I want to save

                @Id
                @GeneratedValue(strategy = GenerationType.AUTO)
                private Long id;
                

                我也想避免在数据库中获取 ID 的任何缺点.

                I would like to avoid also any drawback in the DB to fetch the ID .

                推荐答案

                随着生成 GenerationType.AUTO hibernate 会寻找默认的 hibernate_sequence 表,所以将生成更改为IDENTITY 如下:

                With the generation GenerationType.AUTO hibernate will look for the default hibernate_sequence table , so change generation to IDENTITY as below :

                 @Id
                 @GeneratedValue(strategy = GenerationType.IDENTITY)
                 private Long id;
                

                这篇关于表 'DBNAME.hibernate_sequence' 不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)

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

                            <tbody id='Veebc'></tbody>
                          <legend id='Veebc'><style id='Veebc'><dir id='Veebc'><q id='Veebc'></q></dir></style></legend><tfoot id='Veebc'></tfoot>
                        • <small id='Veebc'></small><noframes id='Veebc'>