Using Postgresql with Grails : Missing sequence or table: hibernate_sequence

亡梦爱人 提交于 2019-12-03 09:00:44

You probably have one of the entities using a sequence ID generator without any sequence name configured, and Hibernate thus uses the default sequence name: hibernate_sequence, but doesn't find it.

Configure the sequence name (and use an existing sequence), or create the hibernate_sequence sequence in database, or don't use a sequence-based generator.

You can configure Postgres to use one sequence per table - I described that here: http://grails.1312388.n4.nabble.com/One-hibernate-sequence-is-used-for-all-Postgres-tables-td1351722.html

But you'll still need to create the sequence(s). dbCreate='update' doesn't create sequences (only create and create-drop do) so you'll need to manually create them or use a migration tool like http://www.grails.org/plugin/database-migration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!