Missing sequence or table: hibernate_sequence

后端 未结 8 2267
礼貌的吻别
礼貌的吻别 2020-12-14 15:49

I am new to hibernate and postgres. Actually I am trying to map potgres database using Hibernate. This is my table stucture in postgresql

CREATE TABLE employ         


        
相关标签:
8条回答
  • 2020-12-14 16:42

    Apart from creating the table hibernate_sequence which has a column next_val you can also set quarkus.hibernate-orm.database.generation = drop-and-create. Note this will delete all the record in you database.

    0 讨论(0)
  • 2020-12-14 16:43

    For me, what was causing this error was the wrong version of the MySql.Data library.

    I had a version 6.9.6.0 defined in the web.config and yet the actual referenced version was older.

    I just commented out :

         <system.data>
          <DbProviderFactories>
          <remove invariant="MySql.Data.MySqlClient" />
            <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
         </DbProviderFactories>
       </system.data>
    
    0 讨论(0)
提交回复
热议问题