class TableHeaderSuratJalan { // a lot of field ... static mapping = { id column: "hdsj_id", generator: "sequence", params: [sequence:"table_header_surat_jalan_hdsj_id_seq"] version false } }
We need to specify the sequence name, in this example my sequence's name is table_header_surat_jalan_hdsj_id_seq. By default grails will use hibernate_sequence