Schema-validation: missing table [hibernate_sequences]

后端 未结 1 1979
清歌不尽
清歌不尽 2020-12-19 22:43

I use Spring 4.3.3.RELEASE, Hibernate 5.2.2.Final, the database is MySQL. I wanted to try strategy = GenerationType.TABLE. As I know for GenerationT

相关标签:
1条回答
  • 2020-12-19 23:40

    The exception is occured because you haven't mentioned generator in @GeneratedValue..Below is the example

        @GeneratedValue(strategy=GenerationType.TABLE, generator="course")
            @TableGenerator(
                    name="course",
                    table="GENERATOR_TABLE",
                    pkColumnName = "key",
                    valueColumnName = "next",
                    pkColumnValue="course",
                    allocationSize=30
                )
        private int id;
    
    0 讨论(0)
提交回复
热议问题