Grails 5 how to get next sequence id

35 Views Asked by At

For a form I need as a default the next sequence id in the form. Do you guys have any idea's how to tackle this with hibernate?

id column: 'KEY', sqlType: 'NUMBER', generator: 'sequence', params: [sequence: 'Test.test_SEQ'], length: 10

I tried to make a new object and get the id but this turns in a null.

0

There are 0 best solutions below