I am trying to map an existing oracle table to a new Grails Domain Object. I also have an existing sequence. When calling "run-app", I get an error:
Unsuccessful: create sequence hibernate_sequence
ORA-01031: insufficient privileges
My goal is to use the existing sequence, and not create a new one. For the record, this is my first Grails/Groovy attempt.
My domain object looks like below. Table name is Uicc_Inv_Detail
. PK is UICC_INV_DETAIL_ID
. Other columns are the same name as in Uicc Class. Sequence name is Uicc_Inv_Detail_Seq
.
I assume my whole "id generator" section is wrong.
class Uicc {
String id
String iccid
String imsi
static mapping = {
version false
table 'Uicc_Inv_Detail'
id generator: 'sequence',column:'UICC_INV_DETAIL_ID',
params: [table: 'Uicc_Inv_Detail_Seq', column: 'nextval']
}
static constraints = {
}
}