Search code examples
spring-roo

Roo Script - howto change pk name from "id"


i got a script who create jpa entitys. All pk-column is named id.

what i got now is:

entity jpa --class bla.Test
field string --notNull --fieldName email --clas bla.Test

will create

CREATE TABLE test {
  id BIGINT PRIMARY KEY,
  email MEDIUMTEXT
}

i like to have test_id as pk


Solution

  • entity jpa --class bla.Test --identifierField test_id