Using Postgresql with Grails : Missing sequence or table: hibernate_sequence

前端 未结 2 1063
[愿得一人]
[愿得一人] 2021-02-11 06:44

I\'m having trouble with Grails 2.0 and Postgresql 9.1

I\'m trying to map an existing database, with sequential ids. However, even without creating any class in the doma

2条回答
  •  无人共我
    2021-02-11 07:00

    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

提交回复
热议问题