jpa save 報錯,提示 xx.hibernate_sequence' doesn't exist

Solution 1:

Put the string below in .application.properties

spring.jpa.properties.hibernate.id.new_generator_mappings=false

Solution 2:

You can  put the string below above your primary key:

@GeneratedValue(strategy = GenerationType.IDENTITY)

詳見:https://stackoverflow.com/questions/32968527/hibernate-sequence-doesnt-exist

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章